[SOLVED] Baud rate from clock cycle

Status
Not open for further replies.

stephane2788

Newbie
Joined
May 18, 2012
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,287
Hello, i'm doing a course on edX regarding UART and I have the below questions:
Can anybody help me understand why my values are wrong?
 

Hi,

UART transmit in NRZ (non return to zero) coding.
While RZ usually needs two (clock) edges for one bit
NRZ is level related only. It may output 8 data bits without a single edge.

Thus the smallest time between two edges determines the baud rate.
The smallest time is 1ms, means 1000 bits/s = 1000 baud.

Analyzing the signal beginning with the first vertical grey line:
Code:
  H -  L  -  L -  H -  L -  L -  H -  H -  L -  H -  H - H  -
IDLE-START-Bit0-Bit1-Bit2-Bit3-Bit4-Bit5-Bit6-Bit7-Stop-Idle-

Now focus on the Bit0..Bit7, it is: L - H - L - L - H - H - L - H
but this is "LSB first", thus the least significant bit is on the left side.
But binary values show the least significant bit on the right side.
Thus you need to reverse the bit order:
L - H - L - L - H - H - L - H --> 10110010 (binary) which is 0xB2 (hex)

Klaus
 
First box - The smallest bit is 1 millisecond long. How many bits can you send in a second?

Second box - you have almost the right answer except bit 0 is on the left (after start bit of '0' low), not on the right

EDIT: KlausST beat me to it
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…