Logic analyzer project

Guys,
I’m looking for some Arduino based logic analyzer project. I have Mega and UNO.
Target is to analyze UART data @ 57kbps. The problem is to have >100MOhm input attenuator I guess in order to be able to use it In-Circuit.
If anyone knows such projects, please send me the link.

Thanks

have you tried google arduino logic analyzer ? almost 50.000 hits with a number of interesting ones on the first page...

But I never build one (for keeps)

yes and because of that much amount of data I am asking if anyone have experience and can recommend the project which fits above requirements.

A long while ago I posted some proof of concept code in 'gigs and collaborations' as I needed someone to help with processing code but got no takers. I just searched for the thread and found it in 'Exhibition/Gallery' which confuses me as I don't remember posting it there. Another thread worth looking at is this as it is meant to use an open source front end (I have never tried it myself).

See Section 20 of the 328P datasheet - set the UART of the monitoring Arduino to 57K and just receive the data normally. Are you sure it 57K and not 57.6K? Monitoring serial data like that is usually done with a Protocol Analyzer, not a Logic Analyzer. Add an appropriate buffer if you want to tap into the transmitter to be monitored without adding much load. The signal to be monitored - 0/5V? RS232 (+/-3 to +/-10 or 12?)

Riva: A long while ago I posted some proof of concept code in 'gigs and collaborations' as I needed someone to help with processing code but got no takers. I just searched for the thread and found it in 'Exhibition/Gallery' which confuses me as I don't remember posting it there.

It might be moved by one of the moderators as it was more a showcase than a question.

CrossRoads: See Section 20 of the 328P datasheet - set the UART of the monitoring Arduino to 57K and just receive the data normally. Are you sure it 57K and not 57.6K? Monitoring serial data like that is usually done with a Protocol Analyzer, not a Logic Analyzer. Add an appropriate buffer if you want to tap into the transmitter to be monitored without adding much load. The signal to be monitored - 0/5V? RS232 (+/-3 to +/-10 or 12?)

  • I'm not monitoring Arduino, but want to use Arduino to in-circuit monitor a device with UART.
  • yes, 57.6kbps it is, sorry
  • 0-3v logic.
  • seems logic analyzer will do the job for me, as I can count bits. Protocol analyzer seems to be more complicated area.

robtillaart:

Riva: A long while ago I posted some proof of concept code in 'gigs and collaborations' as I needed someone to help with processing code but got no takers. I just searched for the thread and found it in 'Exhibition/Gallery' which confuses me as I don't remember posting it there.

It might be moved by one of the moderators as it was more a showcase than a question.

Further searching and I found the original post. I must have dumped the code in Exhibition after lack of interest and forgot I had done it (A sign of getting old)

Riva:

robtillaart:

Riva: A long while ago I posted some proof of concept code in 'gigs and collaborations' as I needed someone to help with processing code but got no takers. I just searched for the thread and found it in 'Exhibition/Gallery' which confuses me as I don't remember posting it there.

It might be moved by one of the moderators as it was more a showcase than a question.

Further searching and I found the original post. I must have dumped the code in Exhibition after lack of interest and forgot I had done it (A sign of getting old)

Riva, thanks. But is it easily extensible to 3 channels? I need to capture RX/TX/CLK...

0-3V, can read that with Arduino directly, or maybe invert it first.
Then just use regular serial commands to read it, buffer a bunch and send it to the PC or whatever:

// declare variable, pinModes, Serial.begin, etc.
int index = 0;
byte incomingArray[1000];

//then
void loop(){
if (index <1000){
 if (Serial.available()>0){
 incomingArray[index] = Serial.read();
 index = index +1;
 }
}
else {Serial.println("array full");  // TX out to PC
  for (x=0; x<1000; x=x+1){
  Serial.println(incomingArray[x]);
  }
 }

} // end loop

If you have a Mega, can monitor Rx & Tx at the same time.
If its a UART, is there even a clock to look at?

acid: Riva, thanks. But is it easily extensible to 3 channels? I need to capture RX/TX/CLK...

The code as it stands is no use as it's single channel but as others have said if it's standard serial data (not if it's using CLK) and you know the baud rate the arduino UART is all you need.

CrossRoads:
0-3V, can read that with Arduino directly, or maybe invert it first.
Then just use regular serial commands to read it, buffer a bunch and send it to the PC or whatever:

// declare variable, pinModes, Serial.begin, etc.

int index = 0;
byte incomingArray[1000];

//then
void loop(){
if (index <1000){
if (Serial.available()>0){
incomingArray[index] = Serial.read();
index = index +1;
}
}
else {Serial.println(“array full”);  // TX out to PC
 for (x=0; x<1000; x=x+1){
 Serial.println(incomingArray);
 }
}

} // end loop



If you have a Mega, can monitor Rx & Tx at the same time.
If its a UART, is there even a clock to look at?

Thanks for the code, got the point.
How can I increase input impedance of measuring part in order not to interfere device?

Put a buffer between the arduino and the device http://www.digikey.com/product-detail/en/SN74HCU04N/296-9820-5-ND/380085 Run the monitored signal thru 1 gate if need inverted, run thru 2 if not. 1uA of load.

seems logic analyzer will do the job for me, as I can count bits. Protocol analyzer seems to be more complicated area

These days they are the same thing, and available for about $0 + VAT for a clone or $149 for a genuine Saleae.

Get one and stop faffing around, it will be the most useful $ you ever spend on test gear.

capture RX/TX/CLK

Async serial does not have a clock, is this something else?


Rob