| ??? 09/03/03 02:33 Read: times |
#53944 - unpredictable first character |
Hi all,
Is there any special note on using UART of AT89C52 with baudrate generator mode of its Timer2? Upon transmitting string, the first character transmitted seems to be unpredictable. I use polled transmitting and receiving. The snippet: void ser_init( unsigned int rate ) { // Timer2 setup TH2 = RCAP2H = rate >> 8; TL2 = RCAP2L = rate; SCON = 0x72; // Mode 1, REN 1 T2CON = 0x34; // TR2 = 1; } |



