Pages: 1 2 [3] 4 5   Go Down
Author Topic: SUMP compatible logic analyzer code for Arduino.  (Read 31884 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 3
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can either download the files from the branch via the web interface, or using the git command line.
Here's how to use the commandline.

Initial checkout (of master branch) and switching to logic_analyzer_megaram branch.
$ git clone https://github.com/gillham/logic_analyzer.git
$ cd logic_analyzer
$ git checkout logic_analyzer_megaram

Switching back to the master branch is easy.
$ git checkout master
Logged

Budapest
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you gillham for your great code.

I was about to describe some difficulties i was having but they all got solved while I was typing) so thanks again.
But could you please share your signal generator sketch along with some instructions on how to use it.
I have your code on Mega 2560 and would like to test it with another Uno I have.
Thank you and a Happy New coming Year to all!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have been messing around with some IR decoding and thought I would give this a shot and had a few problems.

Has anyone updated the Sketch since Arduino 1.0 came out?

I get a compile error that "As of Arduino 1.0, the 'BYTE' keyword is no longer supported. Please use Serial.write() instead.

I started to make the modification and got stuck in a few places that had "Serial.write(0x00, BYTE );" Changing to  Serial.write(0x00); produces a new error. I figured I would ask before I spent too much time.

Thanks,
« Last Edit: December 30, 2011, 10:16:19 pm by USMC » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 151
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try here: https://github.com/gillham/logic_analyzer/branches
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@tocpcs: Thanks for the link.

I was able to get the latest sketch (logic_analyzer.ino) to compile after commenting out #define MEGARAM 1. I copied the .cfg files and made sure they were modified for the 1000ms delay as noted in an earlier post, still getting "device not found". I get a response from the Arduino via serial when the sketch is running by pressing 0 or 1.

Arduino Duemilanove W/Atmega 328
Macbook Pro W/OS X 10.7.2
Logic Analyzer Client 0.9.4
Logic Analyzer Sketch Release: v0.06 November 4, 2011.
Arduino 1.0

I had some similar growing pains with the Bus Pirate, but eventually got it going. Any suggestions would be great.  

-John
 
**UPDATE**  Increased the delay to 1500ms and it seems to be working
 
« Last Edit: December 31, 2011, 01:04:38 am by USMC » Logged

Offline Offline
Newbie
*
Karma: 3
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The master branch (what shows up on the front page of http://github.com/gillham/logic_analyzer ) should work fine on 1.0 and doesn't have the Mega external SRAM support. Make sure the branch drop down says "master" and you should have the right one.

I'm working on a version for the Mega with 512kb of external SRAM (via a "QuadRAM" board). The current branch doesn't bank switch and supports 55kb. My bank switch version is in development but will support at least 443kb of samples at 500KHz.

Anyway, let me know if you have any more trouble and try the master branch if you can.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all

This looks like a great project. Just what I'm looking for.

I currently have a Mega1280 clone.  Any reason this should not work?

If not I'll give it a try.  Whats the best client to use. I'm on Vista.
Thanks for any pointers offered.

Carry on the great work.

Rob
Logged

Ile-de-France (92 sud), France
Offline Offline
Edison Member
*
Karma: 23
Posts: 2054
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys

I've read the thread from the beginning and I'd like to use this tool.
Unfortunately I am a bit lost with some steps as I am a Windows moron  smiley-grin

I managed to install Git for Windows (yeah! smiley-wink) and grab both Gilham and Jawi tree.
I can find the Arduino sketch in Gilliam but not sure what I have to do with hundreds of files for OLS.
I understood it needs to be compiled ! Java ? Compiled ?

I also tried to get the pre-built binary from BoxOrange opst on page 1 but the file has moved away from MediaFire

So if someone could summarize me what I need to do to get OLS ready to run, or provide me a pre-built one, that would be nice.

Thanks in advance.
Logged

Barbuduino: Arduino sur Breadboard & VinciDuino: Clone Leonardo // WR703: Mini-routeur hacké // LauchPad MSP430 et Stellaris // Panda II Arduino-like .NetMF sous VisualC#
RTFC: Read That F.....g Code / RTFD: Read That F.....g Doc / RTFDS: Read That F.....g DataSheet / RTFS: Read That F.....g Schematic / Wot da ya wanna D.I.Y. today ?

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
# 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###

« Last Edit: December 19, 2012, 08:53:18 pm by jhax78 » Logged

London
Offline Offline
Full Member
***
Karma: 0
Posts: 192
Yes, we can (solder)!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I followed the instructions and set up both an Arduino Duemilanove and a Mega. They both appear at Devices and when I click on the Metadata-button, I can see OLS recognises the board. Yet, when I hit Capture begin, I cannot see anything happening. I tried logic signals of different speed and kind and cannot see any waveform on the channels. What am I doing wrong?
Logged

London
Offline Offline
Full Member
***
Karma: 0
Posts: 192
Yes, we can (solder)!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
# 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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

* SUMP_client_leonardo.zip (9.49 KB - downloaded 22 times.)
« Last Edit: February 22, 2013, 03:40:50 pm by audiomixer » Logged

Offline Offline
Newbie
*
Karma: 3
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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? 
Logged

Offline Offline
Newbie
*
Karma: 3
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley
Logged

Pages: 1 2 [3] 4 5   Go Up
Jump to: