This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Serial IO problem without interrupt

Hi, I'm french so excuse me for my English.
I want to communicate with a PC and a 80c552 card made by myself, this with a serial link.
I have no INT and just an emission of an octet from the 80c552 card to the PC.
My problem is that the PC receives values but not the good one.
In fact only FF is received correctly.
I have made a communication between two PC so my program on the PC is ok.
So the problem comes from the program loaded on the 80c552 and written with keil c51.
I use the mode 1 of serial IO with SM1=1 and I have tried several speed from 2400 to 20000 bauds but nothing changed.
I have no parity and just an octet with a start bit and a stop bit.
Thanks for your help, please answer in english (your french is not so good...), and tell me if there is a better forum for this kind of problem.

Florian

Parents
  • Setting PCON.7 doubles the baudrate if Timer 1 is used to generate the internal clocks. If the baudrate was 19'200Bd, then clearing PCON.7 results in 9'600Bd. However, to find out if this results in 9600Bd for your application, you have to check the reload value for TH1. The reload value depends on the oscillator frequency and PCON.7. What frequency are you using and what is written to TH1 ?

    HHK

Reply
  • Setting PCON.7 doubles the baudrate if Timer 1 is used to generate the internal clocks. If the baudrate was 19'200Bd, then clearing PCON.7 results in 9'600Bd. However, to find out if this results in 9600Bd for your application, you have to check the reload value for TH1. The reload value depends on the oscillator frequency and PCON.7. What frequency are you using and what is written to TH1 ?

    HHK

Children