??? 11/04/09 11:47 Modified: 11/04/09 11:48 Read: times |
#170412 - URGENT !!! 8051 SERIAL COMMUNICATION CODE HELP |
Hi ,I hv written following code for serial transmission of Port1 data to PC from 89c51 . i am compiling following code in side51 cmpiler but getting the error message " error during assembly " in output screen...plz see what shud be the change in the code to successfully send the data
... #include <Philips8xC31-51-80C51Fx-80C51Rx+.h> #include <standard.h> #define PORT1 P1 // P1 recieves the ADC data and transfers it to serial port // unsigned char mybyte ; //intermediate variable// void serial_send(unsigned char mybyte ) ; void main (void) { TMOD = 0x20; SCON = 0x50; TH1 = 0xFD; TR1 = 1 ; TI = 0 ; while(1) { mybyte = PORT1 ; // from port 1 to mybyte variable // serial_send(mybyte) ; } } void serial_send(unsigned char mybyte) { SBUF = mybyte ; while(TI) TI = 0 ; } |
Topic | Author | Date |
URGENT !!! 8051 SERIAL COMMUNICATION CODE HELP | 01/01/70 00:00 | |
Duplicate Thread! | 01/01/70 00:00 | |
Not exactly ... | 01/01/70 00:00 | |
TI | 01/01/70 00:00 | |
Here ya go...![]() | 01/01/70 00:00 |