How to test UART communicate with scope

ronsimpson

Joined Oct 7, 2019
2,748
There are at least three wires for RS232 communications. Ground, transmit data and receive data. The logic levels are at +/- 10V (about).
At the 8051 the logic levels are 0 and 5V. (and inverted compared to the RS232 cable)
There might be some more wires for hand shaking. (clear to send and clear to receive)

If you have an old scope, you probably need to send the same character many times do see a good picture on the scope.
New scopes can be told this is serial communications (inverted/not inverted) and 9600baud, then the scope will decode the data and display it on the display.
 

ronsimpson

Joined Oct 7, 2019
2,748
Your picture is too small. I can not see anything.
My scopes have analog inputs that can work.
My scope has digital inputs that are good for 0 to 5V inputs. Therse are normally used to digital.
I do not think you need VDD.
If you are looking at TX with any input you will see ____--_____----_____--__--__ signals.
My scopes there is a menu to set TX= input_1. Then set the speed of transmission. This allows the scope to display the data in ASCII.
Read the manual on the scope.
 

ronsimpson

Joined Oct 7, 2019
2,748
Lets say it is a DS1102D.
If you use CH1 or CH2 to look at the signal you can see all levels. If there is ringing it will be easy to see. If the lever is 1V and 2.5V you can see that.
If you are using D1...D7 the wave form will look like the picture. It is 0 or 1. Some where you need to set the level. "TTL" or CMOS or 3.3V or 5.0V or 2.8V. If the levers are not good, you cannot see that.
On some high end scopes there are bus decoding functions that can be set. If you set the function to serial RS232 then a "100001"="A".

By not you could have connected the scope and have picture to send to us.

My scopes have probes like this for digital.

1682263274471.png
 

sagor

Joined Mar 10, 2019
860
The 8051 may be using 5V (TTL) levels for serial communication, but the PC is using "real" RS-232 that swings +/-5V to +/-12V (usually). Also, the 8051 TTL signal may be inverted, expecting a driver chip to convert the signal to RS-232.
You will need to capture the data stream to figure out if it is inverted of not. Then, you need to convert the TTL signal to a RS-232 type of signal (via some electronics)
With a dual channel scope, one channel can watch the RX line, the other channel can monitor the TX line. The main thing is to monitor what the 8051 is sending first. Also, you cannot feed a RS-232 signal to the 8051, you might blow the input pin/circuits if you drive the pin with a large negative RS-232 signal.
 

Thread Starter

Kittu20

Joined Oct 12, 2022
355
I think one pin of Prob should be connect to Tx pin of 8051 and probes ground pin should be connect to GND pin of 8051
 

DickCappels

Joined Aug 21, 2008
10,067
What are you using at the PC end of the connection? What kind of serial adapter are you using.

Note: Real RS-232 is pretty rare on computers these days.
 

DickCappels

Joined Aug 21, 2008
10,067
Looks like real RS-232, that’ts one less variable.

If you set up a terminal program using that interface, and connect the RDX pin to the TXD pin the terminal should see everything you type, even with local echo off. The terminal can be your test tool to trace out RS-232 signals. I have a scope but don't use it for that.
 

Thread Starter

Kittu20

Joined Oct 12, 2022
355
Looks like real RS-232, that’ts one less variable.

If you set up a terminal program using that interface, and connect the RDX pin to the TXD pin the terminal should see everything you type, even with local echo off. The terminal can be your test tool to trace out RS-232 signals. I have a scope but don't use it for that.
I took the loop test to check hardware. I removed microcontroller on the board and connected RX and TX together.

I use hyper terminal so when I type I can see text on the screen that show there is no problem with hardware
 
Top