SUMP compatible logic analyzer code for Arduino.

I ordered an Arduino Mega 2560 from SFE, should be here later this week. I'll work on adding better support and get the timing tuned as needed.

I like your idea of combining oscilloscope ("The cheapest dual trace scope in the galaxy" style), logic analyzer, function generator etc into a workbench toolkit that is ready to go. It could be done just by adding a couple extra commands (similar to the debug options) or extend SUMP slightly

My current function generator code is rather simplistic and is set for my 8MHz Arduino Pro Mini. I use 1 button and 1 LED for the UI and it works ok. Timing is fairly accurate according to my OLS hardware, since it is using a hardware timer, but running on a 16MHz Arduino the values will be off by a factor of 2.

Anyway, I'll attach my simple function generator for anyone interested. Make sure you use current limiting resistors as appropriate so you don't damage anything. If you connect your target board, logic analyzer, signal generator etc, it is too easy to have pins in the wrong mode, (both output, one high, one low etc) and over current the pins on one or both devices. 1k Ohm for example on the appropriate pins will limit 5V to 5mA.

Rugged Circuits has a great page about what not to do. ( 10 Ways to Destroy an Arduino — Rugged CircuitsRugged Industrial Arduino Microcontrollers )

function_generator.pde (6.66 KB)