I have written code for communication between GPS module to PC through microcontroller by using software UART. Now i want to send the commands from PC to GPS module through microcontroller using software UART. Is it possible?can any one give me a correct idea about this?.
i’m using msp430f2232,it has one hardware UART.Here i’m receiving data from GPS to Pc using software UART.but i’m getting some issues on hardware uart.
This is code for hardware uart.
while(1)
{//0
CHARREAD = RXBUF0;
if(CHARREAD == ‘$’)
{//1
I=0;
NUMLINESREAD++;
STRINGREAD = CHARREAD; do {//2 if ( URCTL0 == 0) {//3 printf(“%c”,STRINGREAD*);* I++; while (!(IFG1 & URXIFG0)); CHARREAD = RXBUF0; STRINGREAD = CHARREAD; } //3 } while ( CHARREAD!=CR);//2 }//1 }//0
if i give Factory Reset command($ACFRM),i’ll get only $M means first and last character. i think we can solve this problem,could u please guide on this? [/img]
Here i’m using printf for debugging purpose only,i’m checking what data received by microcontroller.then how to check whether GPS is received that data or not.
You’ll have to check your GPS’ data sheet to find out if it’s full duplex or not. If it’s full duplex serial, it can send and receive commands at the same time. If it’s half duplex, it can only send, OR receive, but not at the same time…