Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

Variable Baud rate generation

Status
Not open for further replies.

mrarslanahmed

Full Member level 2
Joined
Nov 15, 2011
Messages
143
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,298
Location
gujranwala pakistan
Activity points
2,205
Need help regarding PIC code, I am working to generate 5150 and 16600 Baud rate, using 8 BIT asycrhounous UART .. Please give me some design recommendation.

I am just delaying for approximatly 20Useconds for 5150 baud rate.

delay code is:

delay_200us()
{
for(j=0;j<60;j++)
asm nop;
}

My problem is i cant achieve precise result
 

In this case you need to change your option register on demand .....and then you can use the timer interrupts to generate respective baud rates...

Good Luck
 

I assume you are bit-banging a software UART. Is it possible to use the built in hardware UART?

You don't tell us which PIC and at what clock speed you are using but most PICs can generate both those rates at 4MHz and at 20MHz with less than 0.5% speed error. If your PIC has a 16-bit baud rate generator it will be even more accurate.

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top