An Improvised ATtiny2313 Logic Analyzer

2313logic

After banging his head against a wall trying to get a PS/2 interface to work, [Joonas] decided he needed a dedicated logic analyzer. He didn’t need anything fancy; writing bits to a serial port would do. He came up with a very, very simple ATtiny2313-based logic analyzer that can capture at 50+ kHz, more than enough for a PS/2 port.

The hardware for [Joonas’] build is a simple ATtiny2313 breadboard adapter, an FTDI Friend, and not much else. 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.

[Joonas] was able to capture PS/2 signals with his logic sniffer, so we’ll call this project a success. However, there were a few problems that made this project a little more trouble than it was worth: there is no easy way to turn a serial dump into a binary file, Putty didn’t allow suppressing output to the terminal, and Mac serial ports twinkling above 115.2 kbps don’t work natively. Still, the project did its job, and we couldn’t ask for anything more.

[via Dangerous Prototypes]

13 thoughts on “An Improvised ATtiny2313 Logic Analyzer

  1. Pedantic, but, the ATiny doesn’t have 8 ports anywhere! There are 8 consecutive port /pins/ on one side of the IC (PB0 – PB7), and a total of 3 ports (A, B & D), even if PORTD is the only full, 8-bit port!

        1. Well I wont say it’s trivial. This guide may be of interest:

          http://www.jwandrews.co.uk/2011/12/saleae-logic-analyser-clone-teardown-and-reprogramming/

          I successfully followed this guide using a windows Xp virtualbox machine. In particular you are looking to program the eeprom with values that make it look like a usbee zx. This is basically a 8 byte string that the software will read upon start.

          I made a mistake and accidentally got it programmed to be a Salae analyzer to begin with (Logic will automatically configure an “unprogrammed device”). So I never got a chance to try it with a “blank”/”fresh” device.

          As for software it works with the latest version of Usbee zx suite. I have successfully decoded async communication (that is what usbee suite calls it, this is what is used to communicate with your average arduino).

          You may also want the cypress usb driver, I’m not sure if that makes a difference or not. This is a part of the package you download to write the eeprom.

  2. There is a way to turn the data into a binary: Processing. Write a simple program to read the serial and write to a file. You don’t need to have Putty.

    @Kalle, with enough money, you can buy anything you want or need. But how much fun is in it?

  3. I Just built a PS/2 to RS232 mouse converter using an ATtiny2313 two weeks ago. It emulates a standard microsoft mouse and tested working under DOS with different mouse drivers, Win 3.11 and Win 95. It does not support the wheel however :-). My boss needed it because some old high-end lab equipment needed serial mice.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.