Electronic – Difference between real binary value and oscilloscope value

oscilloscopeserial

I tried to see an ASCII "A" character with an oscilloscope but the real binary value and oscilloscope values are different why is that? ASCII "A" Binary value – 01000001

The oscilloscope displays this graph:

Ascii A

Ascii A

I use an Arduino Uno to send the ASCII value using the code:

void setup() {  
  Serial.begin(9600);  
}  

void loop() {  
  Serial.println("A");  
  delay(1000);  
}

Best Answer

Here's how you read the oscilloscope waveform. I took the time to edit your waveform picture and annotate it to show which bit is which. The microcontroller sends 10 bits per character; START, which is always 0, 8 data bits and STOP which is always 1. The line also rests at 1, so the first START falling edge alerts the receiver that a bytes is coming. The bits are sent LSB first, so if you want to "take a look" at them aritmetically, you need to mirror them horizontally for them to make any sense. The width of each bit is determinated by the baudrate, and the transmitter and receiver must both know what the baudrate is.

From the below picture you can see that it sends three characters: ASCII character 'A', a carriage return and a line feed.

enter image description here