Error in UART Case Study receiver example code?

If you have a simple question and just want an answer.
User avatar
stephanluik
New User
Posts: 2
Joined: Wed Dec 25, 2013 2:17 pm

Error in UART Case Study receiver example code?

Post by stephanluik »

In the UART Case Study in the on-line Programming Guide, I believe there is an error in the example code for the receiver function. Instead of waiting for 1.5 bit times after the pin has gone low, it waits 0.5 bit times. Therefore, it will see the start bit as the first databit.

https://www.xmos.com/en/node/14806?page=1

"The function below receives a stream of bytes over a 1-bit wire."
You do not have the required permissions to view the files attached to this post.


User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

When stop bit is detected, it waits for half the bit time which makes the data to be sampled at centre.