Go Down

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

alkopop79

Quote
Then send a 1 or a 2. The program should respond with some status txt. This proves that your program is running!


I've tried this one and indeed, I get data back on the serial monitor. I guess the problem has to do with the settings in OLS. Any ideas?

audiomixer


is this project still maintianed?
i really would like some help to get my leonardo working with this.
thanks in advance.
sry for posting in this old thread but couldn't find any other info about it.

edit

nvm figured it out myself it's missing a line of code

[Arduino compatible config file]
Code: [Select]

# Configuration for Arduino Generic Logic Analyzer profile

# The short (single word) type of the device described in this profile
device.type = AGLA
# A longer description of the device
device.description = Arduino Generic Logic Analyzer
# The device interface, SERIAL only
device.interface = SERIAL
# The device's native clockspeed, in Hertz.
device.clockspeed = 16000000
# Whether or not double-data-rate is supported by the device (also known as the "demux"-mode).
device.supports_ddr = false
# Supported sample rates in Hertz, separated by comma's
device.samplerates = 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000, 100000, 200000, 500000, 1000000
# What capture clocks are supported
device.captureclock = INTERNAL
# The supported capture sizes, in bytes
device.capturesizes = 64, 128, 256, 512, 1024
# Whether or not the noise filter is supported
device.feature.noisefilter = false
# Whether or not Run-Length encoding is supported
device.feature.rle = false
# Whether or not a testing mode is supported
device.feature.testmode = false
# Whether or not triggers are supported
device.feature.triggers = true
# The number of trigger stages
device.trigger.stages = 1
# Whether or not "complex" triggers are supported
device.trigger.complex = false

# The total number of channels usable for capturing
device.channel.count = 5
# The number of channels groups, together with the channel count determines the channels per group
device.channel.groups = 1
# Whether the capture size is limited by the enabled channel groups
device.capturesize.bound = false
# Which numbering does the device support
device.channel.numberingschemes = DEFAULT

# Is a delay after opening the port and device detection needed? (0 = no delay, >0 = delay in milliseconds)
device.open.portdelay = 1500
device.receive.timeout = 1000 // this is the Missing line
# Does the device need a high or low DTR-line to operate correctly? (high = true, low = false)
device.open.portdtr = true
# Which metadata keys correspond to this device profile? Value is a comma-separated list of (double quoted) names...
device.metadata.keys = "AGLAv0"

# In which order are samples sent back from the device? false = last sample first, true = first sample first
device.samples.reverseOrder = true

###EOF###




I have had a go at the original code to include some options for the ATmega32u4 - with your config file I can get signals into OLS, but the pinout is just not right.... did you get it to work properly with all of the channels working? I have tested an other port for the input [Port F - Analog A1 - A6] but the results are inconsistent....

- michael

audiomixer

#42
Feb 22, 2013, 06:31 pm Last Edit: Feb 22, 2013, 09:40 pm by audiomixer Reason: 1
I have worked on a version for the arduino leonardo board - still not 100% functional but much better now. I have changed the port back to portB bits 2 - 7 so that the channels match again. these are pins MOSI / MISO and digital 8 - 11.

I haven't gotten the trigger to work reliably, but that might be an issue with the code itself.

I also changed the max buffer size as the leonardo has a whopping 2.5k of SRAM instead of the 2k of the UNO. therefore the buffer can be extended somewhat.the code has a few more 'if statements' to inculde ATmega32u4 specialities, but otherwise is unchanged. I tried to comment as required.

so here are the modified  files for the leonardo:

- cheers,

Michael

gillham


I've tried this one and indeed, I get data back on the serial monitor. I guess the problem has to do with the settings in OLS. Any ideas?


Can you try this again using the latest code & configuration files from github? 

gillham

A couple of updates.   I had broken triggers with my previous change to PORTD and I've fixed it.  I also went back to PORTB as the default (with PORTD as a #define option) as it seems to work better for me.

Secondly, I've added a branch with a "toy" release of a network attached logic analyzer.  If you have a Wiznet W5100 (only thing I have tested) Ethernet shield you can play around with it with Jawi's OLS client.  Configure your appropriate ip in the sketch, upload it and connect to it on port 1234 from the OLS client.
I'm using PORTD as most of PORTB is the SPI connection to the Ethernet shield.
It is on a branch if you want to mess with it:  https://github.com/gillham/logic_analyzer/tree/aglan_alpha

It isn't particularly useful, but I suppose there might be a corner case where it helps.  Anyway, check it out, it is kind of fun talking to the logic analyzer via TCP/IP.

Lastly, I uploaded a primitive function generator sketch.  I use it with my logic analyzer testing along with an Open Bench Logic Sniffer.
You might get some use out of it.  https://github.com/gillham/function_generator

One caveat about the function generator, it is setup for a LCD Keypad shield available on eBay.  Look for the "DF Robot" on the silkscreen.
If there is interest I could make a version with a different UI (one button & LED, or serial, or what?) if you want to make suggestions, you can post on github.
You can use the square wave generator (max of 8MHz) as an emergency clock source for an AVR if you need it. :)

Go Up