kevin88
Junior Member level 1
Hi,
i need help on receving data from the 8051 mircocontroller interfacing with GPS. currently, i m using printf and put char to transmit data to the GPS. But when i used scanf and printf for the data output. i found out that the data does not read the whole string data but one char. may i know where will b the problem lies? thanks..
void gps(void)
{
//Save Current SFR page
char SFRPAGE_SAVE = SFRPAGE;
g_uc_uart = 1;
printf("log version\r");
scanf("%s", g_s_gps_str);
printf("GPS %s", g_s_gps_str);
SFRPAGE = SFRPAGE_SAVE;
}
i need help on receving data from the 8051 mircocontroller interfacing with GPS. currently, i m using printf and put char to transmit data to the GPS. But when i used scanf and printf for the data output. i found out that the data does not read the whole string data but one char. may i know where will b the problem lies? thanks..
void gps(void)
{
//Save Current SFR page
char SFRPAGE_SAVE = SFRPAGE;
g_uc_uart = 1;
printf("log version\r");
scanf("%s", g_s_gps_str);
printf("GPS %s", g_s_gps_str);
SFRPAGE = SFRPAGE_SAVE;
}