Tag Archives: Joonas Pihlajamaa

Improvising a logic analyzer with an ATtiny2313

Joonas Pihlajamaa wasn’t having much luck debugging his PS/2 keyboard interface. Wishing he had a dedicated logic analyzer, Joonas ultimately decided to combine an ATtiny2313, breadboard and FTDI for unlimited-length logic capturing with a PC.

As the HackADay crew notes, the ATtiny2313-based logic analyzer is capable of capturing at 50+ kHz, more than enough for a PS/2 port.

“The 2313 has eight input ports on one side of the chip, making attaching the right logic line to the right port a cinch. The highs and lows on each logic line are sent to a computer over the FTDI chip, converted into OLS format and piped into Open Sniffer to make some fancy graphs,” explained HackADay’s Brian Benchoff. “Joonas was able to capture PS/2 signals with his logic sniffer, so we’ll call this project a success.”

As previously discussed on Bits & Pieces, Atmel’s high-performance, low-power 8-bit AVR RISC-based ATtiny2313 microcontroller boasts 2KB ISP flash memory, 128B ISP EEPROM, 128B internal SRAM, universal serial interface (USI), full duplex UART and debugWIRE for on-chip debugging.

The ATtiny2313 also supports a throughput of 20 MIPS at 20 MHz, operating between 2.7-5.5 volts. By executing powerful instructions in a single clock cycle, the MCU achieves throughputs approaching 1 MIPS per MHz – neatly balancing power consumption and processing speed.

Interested in learning more about Atmel’s extensive lineup of versatile tinyAVRs? You can check out our complete device breakdown here.