??? 03/17/09 23:57 Read: times |
#163550 - Use Timer 2... Responding to: ???'s previous message |
Chico said:
Hello, I need an AT89S52 to receive serial data at 31.250 kbps and send serial data at 250 kbps.
I know how to make 31.250 kbps with 12mhz crystal, and know how to make 250 kbps with 16mhz crystal, but dont know how to make both at same time with just 1 crystal... how can I do this? it is possible? Use Timer 2 in "baud rate generator" Mode: At 8MHz clock speed set RCAP2H=255 and RCAP2L=248 for 31.25kBaud and set RCAP2H=255 and RCAP2L=255 for 250kBaud. At 16MHz clock speed set RCAP2H=255 and RCAP2L=240 for 31.25kBaud and set RCAP2H=255 and RCAP2L=254 for 250kBaud. Kai |