Continue to Site

# [SOLVED]Baud rate from clock cycle

Status
Not open for further replies.

#### stephane2788

##### Newbie
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?

#### KlausST

##### Super Moderator
Staff member
Hi,

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

stephane2788

### stephane2788

Points: 2

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.