Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

PIC18 not receiving UART data in given sequence

Status
Not open for further replies.

scorrpeio

Full Member level 5
Joined
Dec 26, 2006
Messages
286
Helped
10
Reputation
20
Reaction score
9
Trophy points
1,298
Activity points
3,496
I have interfaced Maxbotix distance sensor with PIC18 through UART(without MAX232).

As per the datasheetof the sensor, it sends the Distance info in the form of R D0 D1 D2 D3 \r format, where D0-D3 represent distance in the ASCII char form.

When, I receive bytes on PIC, it is something unexpected. Always, I get the redundant data in RCBUF. I never receive R or \r at the start and end of message frame.

Kindly tell me, where might be the problem
 

samson A.

Member level 3
Joined
May 15, 2009
Messages
58
Helped
10
Reputation
20
Reaction score
10
Trophy points
1,288
Location
Lagos, Nigeria
Activity points
1,642
Check your baud rate and try compute its percentage error, if about 9 - 10%. Choose another crystal oscillator.
 

scorrpeio

Full Member level 5
Joined
Dec 26, 2006
Messages
286
Helped
10
Reputation
20
Reaction score
9
Trophy points
1,298
Activity points
3,496
Thank you for the replies....that gave me direction.
I could solve it...a small change was required in baud rate settings.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top