Go Down

Topic: SUMP compatible logic analyzer code for Arduino. (Read 44 times) previous topic - next topic

gillham

There original SUMP protocol is here: http://www.sump.org/projects/analyzer/protocol/
The extended version is here: http://dangerousprototypes.com/docs/The_Logic_Sniffer%27s_extended_SUMP_protocol

It seems like a couple 8bit "short commands" could be added as long as they don't overlap with anything listed in the above links.
My initial thought would be something like below.  These couldn't all be 8 bit short commands though as things like the function generator at least need parameters like what frequency or function.  I was just picking simple mnemonics so you could connect serially and press 'A' for example.  Might need a 'T' command to say "send values in text not binary" when doing that I guess.
Code: [Select]

#define SUMP_MULTIMETER_AMP_DC 0x41 // ASCII 'A' for Ampere
#define SUMP_MULTIMETER_AMP_AC 0x42 // ASCII 'B' (can't think of a mnemonic)
#define SUMP_FREQUENCY_COUNTER 0x43 // ASCII 'C' for Counter
#define SUMP_MULTIMETER_FARAD 0x46 // ASCII 'F' for Farad
#define SUMP_FUNCTION_GENERATOR 0x47 // ASCII 'G' for Generator
#define SUMP_MULTIMETER_HENRY 0x48 // ASCII 'H' for Henry
#define SUMP_MULTIMETER 0x4E // ASCII 'M' for Meter
#define SUMP_MULTIMETER_OHM 0x4F // ASCII 'O' for Ohm
#define SUMP_MULTIMETER_VOLT_AC 0x52 // ASCII 'R' for RMS maybe?
#define SUMP_OSCILLOSCOPE 0x53 // ASCII 'S' for Scope
#define SUMP_MULTIMETER_VOLT_DC 0x56 // ASCII 'V' for Volt
#define SUMP_MULTIMETER_WATT 0x57 // ASCII 'W' for Watt


It wouldn't really make sense for a SUMP logic analyzer client to use these extended commands, but adding them to my existing logic analyzer code would make it easy to have a device that responds to SUMP for the OLS client and does the extra functions as well.

gillham

I guess short commands are impractical since many of the functions need a 'type' (what to measure, or what kind of function to generate) followed by a 'range' or 'value' (what frequency to generate).  So perhaps the 1st byte commands could be:

Code: [Select]

#define SUMP_FREQUENCY_COUNTER 0x43 // ASCII 'C' for Counter
#define SUMP_FUNCTION_GENERATOR 0x46 // ASCII 'F' for Function
#define SUMP_MULTIMETER 0x4E // ASCII 'M' for Meter
#define SUMP_OSCILLOSCOPE 0x4F // ASCII 'O' for Oscilloscope


After that the 4 byte parameters can be whatever is needed for the appropriate functions.

gillham

I've added initial Mega 2560 support to the logic analyzer.  Please check it out here:
https://github.com/gillham/logic_analyzer

The Mega 2560 supports allows 8 channels (using PORTA, pins 22-29, but you can configure it) and 7K samples.  I have done some basic timing tests and it is fairly accurate.  I will tune it with my Open Bench Logic Sniffer soon, but it seems very usable already.

Please test it and let me know how it works for you.  I've added the two device profiles to the repository so they're easy to find.

caroper

Thanks gillham,

Looks good, I just did a quick sample with no inputs connected and channel 0 read High and the rest Low, I guess that pin has an internal pull-up assigned.  Thanks for confirming the timing and increasing the sample size.

I found this and thought you my be interested:
http://www.easyvitools.com/rdesign/index.html

It is a bit too slow for our needs and looks old ( Help about says 2003 ) but is a great concept, if all you need is low speed switching and sampling. I am going to use it to do a Proof of Concept for the Bread-boarding tool interface. but I may have to write the target code myself to get the sort of performance I will need.

Is anyone out there aware of any other Control Panel / Virtual instrument tools that work with serial I/O ?
I have not managed to find anything customisable between this program on the low end and lab-view on the high end of the scale. They all seam to be designed to work with SPICE with no physical Real World interface or they are designed to work with dedicated hardware.

I did find a device that does provide all the functianality, but at a much higher speed and accuracy than I had in mind, with a corospondingly higher price tag too :) but I will include it here as It is a good target to aim for.

http://www.tina.com/English/tina/real_time_t_m

Cheers
Chris


al1fch

#24
Aug 04, 2011, 10:52 am Last Edit: Aug 04, 2011, 11:02 am by al1fch Reason: 1

Go Up