??? 09/17/12 08:57 Read: times |
#188365 - problem in receiving serial data |
please check this code. i send a data (characters)from hyperterminal. but microcontroller didnt response. data sending from microcontroler to pc is done but still problem in receiving.
(i have used 8051 developement kit. so i think there is no problem in hardware.) please help me in this topic. #include <reg51.h> void main(void) { unsigned char my_byte; TMOD=0x20; //use Timer 1, mode 2 TH1=0xFD; //9600 baud rate SCON=0x50; TR1=1; /start timer while (1) //repeat forever { while (RI==0); //wait to receive my_byte=SBUF; //save value P1=mybyte; //write value to port RI=0; } } |
Topic | Author | Date |
problem in receiving serial data | 01/01/70 00:00 | |
variable names | 01/01/70 00:00 | |
Instead of copy paste from the original, | 01/01/70 00:00 | |
National security | 01/01/70 00:00 | |
not necessarily 'national' | 01/01/70 00:00 | |
Not really security | 01/01/70 00:00 | |
very possible, ... | 01/01/70 00:00 |