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

RS232 communication in 8051

Dear all,
i am new to this domain. i am trying to send some data from 8051 microcontroller to the PC. i am using philips P89V51RD2 microcontroller and i am using Keil4.22 version tool to program. i read the 8051 tutorial and configured everyting related for this communication, but still i didn't get the result. Kindly give your guidance to proceed the work further..

The code is as follows,

void main (void)
{ init_SerialPort() ;

while (1) { T1 = 0 ; SBUF = 'A' ; UserDelay(200) ; }
}

void init_SerialPort()
{ SCON = 0x53 ; PCON = 0x80 ; TMOD = 0x2F ; TH1 = 0xFD ;
}

Thanks and Regards
Radhakrishnan M

Parents
  • Delays on receive side would really be bad. That's a ten points out of ten recipe for producing failed communication.

    If a receiver can't keep up with incomming data, and don't have any handshake support (hw handshake lines or XON/XON or similar) and the processor load just from the serial interrupts is almost killing, then the workaround is obviously to deactivate the serial port for a while. Maybe reactivate it again in 10 seconds, and see if the abuser is still there, trying to upload the illustrated edition of the Encyclopedia Galactica ;)

Reply
  • Delays on receive side would really be bad. That's a ten points out of ten recipe for producing failed communication.

    If a receiver can't keep up with incomming data, and don't have any handshake support (hw handshake lines or XON/XON or similar) and the processor load just from the serial interrupts is almost killing, then the workaround is obviously to deactivate the serial port for a while. Maybe reactivate it again in 10 seconds, and see if the abuser is still there, trying to upload the illustrated edition of the Encyclopedia Galactica ;)

Children