??? 05/26/04 21:28 Read: times |
#71269 - Two queries pertaining to serial interfa |
Two queries pertaining to serial interfacing :
1) I am reading the data input from the serial interface into a buffer on the 89c51rd2bn.This data is to be read in only when the user presses an input on the micro and then presses an input on the transmitting device.The problem I face is when , the user reverses the sequence of operation accidentaly,i.e. he presses the transmitting device input first and then presses the micro's input.In such a case the micro will not read until the user presses the transmiiting device's button again.This is what i have coded. The problem I face is that there is one extra character which is added at the beggining of the byte stream.This character is part of the previous string where the user had made the erroneous sequence. Is there any way to clear only the SBUF register before serial i/o is initiated ( similar to flush(port ) in C ) , so that I can debug more precisely, the cause of the problem ? 2) I have a problem the when I am using a 9600 baud rate , sometimes the characters are geting dropped . There is no problem when i reduce the baud rate to 2400.The distance between the Rx and Tx'ing devices is about 2 meters. I am initialising the micro with /* RCAP2H = 0xff ; RCAP2L = 0xd9 ; T2CON = 0x34 ; SCON = 0x50 ; */ . I would appreciate any suggestions / advice on solving this problems. Kind regards Thomas Fernando |
Topic | Author | Date |
Two queries pertaining to serial interfa | 01/01/70 00:00 | |
RE: Two queries pertaining to serial interfa | 01/01/70 00:00 | |
RE: Two queries pertaining to serial interfa | 01/01/70 00:00 | |
RE: Two queries pertaining to serial interfa | 01/01/70 00:00 | |
RE: Two queries pertaining to serial interfa | 01/01/70 00:00 | |
RE: Two queries pertaining to serial interfa | 01/01/70 00:00 | |
RE: Two queries pertaining to serial interfa | 01/01/70 00:00 | |
RE: Two queries pertaining to serial interfa | 01/01/70 00:00 | |
RE: baud rate | 01/01/70 00:00 | |
RE: baud rate![]() | 01/01/70 00:00 | |
high baud rates | 01/01/70 00:00 |