??? 01/06/05 09:59 Read: times |
#84438 - serial communication between two ATC51 |
Dear All and Sneha(especially),
well i tried serial communication between two Atmel 80C51 n i faced the same kind of problem but my code was two simple i just set the SCON register by individually setting the bits i put it in mode 0 i.e. SM0=0 and SM1=0 REN=1 (to enable the reception) no baud rate is required to be set when it is in mode 0 as it works in 8-bit shift register mode i just connected the TXD of first ATC51 with the RXD of the second ATC51 and then i put a character in the SBUF to be transmitted. a character is of one byte and when a byte is transmitted, TI(transmit interrupt) becomes one similarly on the receiver end when one byte is received RI becomes 1 showing the reception of data uptill now it works just as it shud but when i try to retrieve the data from the SBUF on the receiver end, i dont get the character which i sent. if u have worked on it, plz tell me tat wt cud be the reason tat i m not getting the character on the other end or if there is any mistake which i m making , plzz do tell me (as soon as possible). thanx Farrukh Ijaz Nust Institute of Information Technology, Pakistan. |
Topic | Author | Date |
serial communication between two ATC51 | 01/01/70 00:00 | |
'Mode 0' uses RxD and TxD differntly! | 01/01/70 00:00 | |
no slave in mode 0 | 01/01/70 00:00 | |
UART mode 0 | 01/01/70 00:00 | |
Call it serial | 01/01/70 00:00 | |
indeed, it is osc/12![]() | 01/01/70 00:00 |