Electronics > Beginners
Question Mark in Rigol RS 232 Decoder
eev_carl:
Hi,
I'm running a simple Arduino example program that reads a button press on D0 and Serial.printlns the int value. It's working perfectly on the Serial Monitor hooked up to the IDE. 0's scroll by until the button is held and then 1's scroll by.
I'm getting a question mark icon on my MSO 1104Z decoder and was wondering what that was. I verified the same 9600,8N1 settings.
Is this a setting problem on the scope or something I can fix with the circuit. This is the schematic https://www.arduino.cc/en/Tutorial/DigitalReadSerial .
Thanks,
Carl
rstofer:
From the User Manual (of the DS1054Z in this case) there are two conditions under which a question mark (or two) will be displayed. A framing error or check error.
A framing error occurs if the number of stop bits anticipated by the scope is more than the device is sending.
A check error occurs if parity is specified but a) isn't present or b) doesn't match.
I would expand those two bytes and walk through the bits. Also check the scope settings. My guess is the scope settings need to be twiddled.
eev_carl:
I took a look at the bits. Some of the extra characters are backspace, j, and NAK. Maybe I'm not using the protocol correctly? I don't have anything going in to RX (I put it to ground and to high as a test) on the microcontroller.
rstofer:
I would change the delay(1) to delay(10) or even more so I could separate the characters strings. I don't know what could account for the invalid chars you are receiving but I also don't know how the decoder is set up. Maybe a photo with the decoder settings would help.
I guess it might help to know how you are probing the circuit. I'm thinking of a loose connection but I can't justify that when the '0' strings display properly.
You can add a digital signal to the mix that goes high just before serial.println() and put this into channel 2. Then trigger on channel 2. Expand the horizontal scale until just one transmission displays (3 chars?). Drop the trigger signal just before the delay() line.
If the error you are getting is a framing error, the scope won't be able to find the stop and start bits and will always receive jabberwocky. You can see if 2 stop bits will help (leave the scope set for 1 stop bit).
--- Code: ---mySerial.begin(9600,SERIAL_8N2);
--- End code ---
hexreader:
The Rigol decoder is very simple (dumb) and tries to decode what is on screen.
It might simply be that the on-screen information starts part way through a character, and takes (in this case) two characters to synchronise.
A logic analyser (even a cheap one) is likely to do a far better job of decoding than your Rigol scope will.
The Rigol is good for a few characters with big gaps between messages, but rubbish at decoding long streams of back-to-back characters.
Just my thoughts - feel free to ignore
Navigation
[0] Message Index
[#] Next page
Go to full version