Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.

We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.

Thank you for your understanding.


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 communication

hi there i am trying to communicate microcontroler with computer.the program is as follow's

#include<reg52.h>

void main(void)
     {
         TMOD = 0x20;
         TH1  = 0xF3;
         SCON = 0x50;
         TR1  = 1;
         PCON = 0x80;
         while(1)
               {
                   SBUF ='A';
                   while(TI == 0);
                   TI = 0;
                   }
         }

at hard ware end i am using max 232cpe
controller at89s52
the prog.
is runing properly.as tested in keil
but not working at the hard ware side
i am tested it in hyper terminal
with the following setting

baud rate 9600
parity bit none
stop bit 1
flow controller none

but no output
please help me

Parents
  • I guess you used 24Mhz?

    It seems that you programmed it to loop forever but not to transmit A forever, but to transmit A once and do nothing.

    Still an A should be transmitted at each reset. Do you receive it?

    Are you sure RX/TX/Gnd are connected right for your cable?

    How do you know if your max232 circuit is working?

    Ed

Reply
  • I guess you used 24Mhz?

    It seems that you programmed it to loop forever but not to transmit A forever, but to transmit A once and do nothing.

    Still an A should be transmitted at each reset. Do you receive it?

    Are you sure RX/TX/Gnd are connected right for your cable?

    How do you know if your max232 circuit is working?

    Ed

Children
No data