MEGA-1284 Logic Analyzer – Viewing UART Signals

Now that you have a MEGA-1284 Logic Analyzer, it is time to view some data signals.  We will start with a UART off of another Arduino, since it is a fairly explicit communications protocol.  I loaded the ASCIITable sketch from the Arduino IDE to generate the communications on the Arduino.  Disconnect the USB and jumper from the power rails 5v0 and GND to the header pins 5v0 and GND on the Signal Arduino.  Then simply connect Channel 0 (D16 or chip pin 22) on the MEGA-1284 Logic Analyzer to D1 (TX) of the Signal Arduino.  You should be ready on the hardware side, so go ahead and plug the MEGA-1284 Logic Analyzer into the PC.  Then, startup the Open Logic Sniffer client application.

Click on <Capture> and <Begin Capture> to open the “Connection” tab and verify connection to the MEGA-1284 by clicking the “Show device metadata” button.  Information show populate the fields below the button.  If not, you will have to verify the connection settings are correct.

Click on the “Acquisition” tab and change the “Sampling rate” to 20 kHz.  At 9600 bps, 10 kHz should suffice, but I was getting noise in the data and the Noise filter is not developed yet for the MEGA-1284.  Click on the “Triggers” tab and click a check in Mask 0 (Channel 0) and nothing in the value for Mask 0 (trigger will occur from a HIGH to a LOW).

**NOTE: The ASCIITable sketch will dump the ASCII characters and then go silent.  We will need to reset the Signal Arduino after the <Capture> button is pressed.  With the bootloader on the Arduino, the trigger will occur during the bootloader listening step of the reset.  If you click <Capture> and then wait 1-2 seconds to push the Signal Arduino Reset button, you will capture the beginning of the communications.  If not, you will either capture the bootloader long LOW then HIGH signal or the middle of the ASCIITable stream.

Press the <Capture> button and then press the Signal Arduino’s Reset button 1-2 seconds later and hopefully, you get an output like this:

UART Output

This will be the signal that we will process.  If you click <Tools> and select <UART Analyser> this window will appear.  Select Channel 0 in the RxD list and 9600 baud or Auto-detect and then click <Analyze>.  When finished analyzing, you should get something like this:

UART Analyzer

As you can see, there were some Bus Errors and if you look at the ASCII data column, I am missing the first letter in the stream for the word “ASCII”.  This would be caused by a late release on the Signal Arduino Reset.   One likely solution would be to Upload via ISP the ASCIITable sketch to the Signal Arduino, over-writing the bootloader and skipping the check UART communications process or use a continuous serial output like the ReadAnalog sketch.

Anyhow, if you close the UART Analyser window to look at you signal again, you will now note white bars in the signal on Channel 0.  Zooming in on the graph will reveal character codes and ASCII charaters, including the missing “A” in beginning of the signal:

Spelled Out

Next we shall explore the 1-Wire Bus.

 

 

Advertisements

Posted on August 6, 2013, in ATmega1284, Project. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: