We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
i tried to send data, through serial data communication, from one Microcontroller[Atmel 8052 - AT89c52] to another Microcontroller[Atmel 8052 - AT89c52] and back to the source Microcontroller and then display the data on a LCD[16x2]. both the Microcontrollers have 12Mhz crystal and the baud rate is 2,400, and i have calculated the reload value for TH1 in mode 2[auto-reload mode] as, 256-[12E6/(32 x 12 x 2400)]=242.98, which is rounded off to the nearest integer 243. By doing this i am not getting the expected result. the output on the LCD is some junk value[looks v.weird]. what could b the problem???
"IS the problem because of the using the 12Mhz crystal [insted of 11.0592], as the reload value is being rounded off to 243 from 242.98???????" Just look at the Keil baudrate calculator - it tells you what the error is. Anyhow, if both micros are using the same clock frequency and the same baudrate generator setup, it's irrelevant!