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]

Comments

  1. bthy says:

    50 kHz .. some logic analyzer =\

  2. Tom says:

    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!

  3. Trui says:

    If you do this on a device with built-in USB port, much higher speeds can be achieved with almost the same method.

  4. Or you can buy this one: http://www.ebay.co.uk/sch/i.html?_nkw=CY7C68013A+%2B+board+-core&_sacat=0&_odkw=CY7C68013A+%2B+board&LH_BIN=1&_sop=15&_jgr=1&_fcid=192&gbr=1&_osacat=0&LH_PrefLoc=2&_sc=1)

    for £5.76 which has 8 channels and has the ability to save in binary files!
    (needs a hack to work with 64 bit computes..)

    • Falense says:

      Actually you can use it on a 64bit os, you just cant use Salae logic software for it. It works just fine with usbee software on W7 64bit :)

      • How did you manage to get it working? I cant get the driver to install properly! what version of usbee software?
        I thought the EEPROM was too slow on this version? (EEPROM hack: http://sunbizhosting.co.uk/~spiral/blog/?p=117)

        • Falense says:

          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.

          • Thanks!
            Well, the module works like a charm on a 32 bit computer with the 1.0.21 version of Saleae Logic, so i think i will stick with that one while my old 32bit laptop still works =)

  5. thoriumbr says:

    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?

  6. 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.

  7. gillham says:

    Or you can use this: https://github.com/gillham/logic_analyzer on a basic Arduino and get up to 4MHz sampling, 1k samples (7k on Mega), and direct support under OLS.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 93,825 other followers