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.

Maximum Baud Rate Generating using 11.059 MHz for At89C52µC

Status
Not open for further replies.

Ravikumar.N

Newbie level 1
Joined
Nov 26, 2005
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,288
Dear All,
I am Ravikumar.N, working on AT89C52 microcontroller from a couple of days. I have an issue regarding the baudrate generation with 11.059 MHz.

I need to generate baudrate from 19200, 38400 and 115200 with 11.059 MHz.

I have worked on 9600 and 57600 with TIMER1 filling an 8-bit value.

I doubt that the above specified baudrates cannot be obtained with an 8-bit value.

Please guide me how obtain the above specified baudrates.

Regards,
Ravikumar.N
 

Re: Maximum Baud Rate Generating using 11.059 MHz for At89C

The highest baud rate for 8051 and Timer 1 with 11,059200 crystal is 57600 ..
For 115200 you need to change the crystal to 22,118400 (for micros which can be clocked with this frequency) ..
However, you can set AT89CXX with 11,059200 to 115200 using Timer 2; see this paper for examples:
http://www.atmel.com/dyn/resources/prod_documents/doc4346.pdf
And, one more thing, it is impossible to cover 38400 using 11059200 crystal .. this can be dony with crystals starting from 7,372800 (x1, x2, x3 ..)
Regards,
IanP
...
MOV SCON,#50h; /* uart in mode 1 (8 bit), REN=1 */
ANL T2CON,#0F0h; /* EXEN2=0; TR2=0; C/T2#=0; CP/RL2#=0; */
ORL T2CON,#30h; /* RCLK = 1; TCLK=1; */
MOV TH2,#0FFh; /* init value */
MOV TL2,#0FDh; /* init value */
MOV RCAP2H,#0FFh; /* reload value, 115200 Bds at 11.059MHz */
MOV RCAP2L,#0FDh; /* reload value, 115200 Bds at 11.059MHz */
SETB ES; /* Enable serial interrupt */
SETB EA; /* Enable global interrupt */
SETB TR2; /* Timer 2 run */
JMP $; /* endless */
...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top