hi, i am doing gps tracking device prject but i am unable to receive any data from my EM-506 Module, i am using to the following piece of code to capture data: void Serial_Init() { TMOD = 0x20; TH1 =0xF4; SCON = 0x50; TR1 = 1; }
rx_data(void) { char x; while(RI==0); x=SBUF RI = 0; //lcd("2"); return x; }
i noticed that the programm is stuck because RI never changes his state but when i measure the the voltage of p3.0 (RX pin of 8051) it changes ("0" and "1") so the cpu receives data from the gps.
thanks in advance.
Are the baud rate and voltages correct? Is the "8051" expecting 5V signalling?
Try doing a simple serial port loop-back on the 8051, where you see if you can receive data you transmit out at 9600 8N1? View that on a oscilloscope.
Ask your project supervisor for assistance.
here, again we have "8051" there is NO SUCH THING anymore. the modern devices have all their little 'specials' re I/O manufacturer and ALL letters needed
View all questions in Keil forum