SUMP compatible logic analyzer code for Arduino.

al1fch:
I imagine your code with some SDRAM !!!

I created a test branch ("logic_analyzer_megaram" branch on GitHub - gillham/logic_analyzer: Implementation of a SUMP compatible logic analyzer for the Arduino ) with preliminary support for external SRAM on the Arduino Mega2560. I am using the Rugged Circuits QuadRAM board ( http://ruggedcircuits.com/html/quadram.html ) myself.

The QuadRAM is paged, but without using any paging it adds a readily addressable 55KB of space for a capture buffer. My test branch supports capturing up to 55KB if you have the '#define MEGARAM 1' uncommented.

Due to some extra cycles on the external memory interface the sampling takes a bit longer and I had to adjust the timing a little. Currently a regular (non triggered) capture at 1MHz is no longer accurate due to the increased delays with the external SRAM, but 500KHz and lower appears to be fairly accurate. Triggered captures are not accurate at 500KHz (they weren't at 1MHz already) but are semi-accurate at 200KHz and lower.

Anyway, if someone has an external SRAM setup and can test this functionality I would appreciate feedback. Rugged Circuits has the board on sale for $19.95 which isn't bad for a 512KB expansion module. I'm not affiliated with them, I've just bought one of their boards.

Also, as the external memory interface uses the pins I had previously sampled on the Mega, I switched to analog pins 0 to 7. I was avoiding using the analog pins previously so they would be available for other uses, but as I haven't added any other features to the firmware at this point, I switched pins. The main branch has not been switched to A0-A7, but I might do that in the future.