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.
Have you done a basic transmit/receive loop-back test yet? Say sending a repetitive 'U' or 0x55 character. What does that look like on a scope? How does that compare with the signals you see from the GPS. ie form, bit-timing?
Take the GPS out of the equation, confirm you can actually use the UART, and the flags function as expected/documented.