// LCD module connections
sbit LCD_RS at PORTD6_bit;
sbit LCD_EN at PORTD7_bit;
sbit LCD_D4 at PORTD2_bit;
sbit LCD_D5 at PORTD3_bit;
sbit LCD_D6 at PORTD4_bit;
sbit LCD_D7 at PORTD5_bit;
sbit LCD_RS_Direction at DDD6_bit;
sbit LCD_EN_Direction at DDD7_bit;
sbit LCD_D4_Direction at DDD2_bit;
sbit LCD_D5_Direction at DDD3_bit;
sbit LCD_D6_Direction at DDD4_bit;
sbit LCD_D7_Direction at DDD5_bit;// End LCD module connections
char *output;int res;
char txt_sub[] = "+CMGR: \"REC UNREAD\",\"";void delay() { // Function untuk delay Delay_ms(10); // delay 500 mili detik}void main() { UART1_Init(9600); // Initialize UART module at 9600 bps delay(); // Wait for UART module to stabilize lcd_init(); lcd_cmd(_lcd_clear); lcd_cmd(_lcd_cursor_off); lcd_out(1,1,"Read Data"); uart1_write_text("AT+CMGR=1\r\n"); delay(); while (1) { if (UART1_Data_Ready() == 1) { // if data is received UART1_Read_Text(output, "\",,\"", 255); // reads text until '",,"' is found res = strcmp(output,txt_sub); uart1_write(res); res = '\x0'; lcd_out(2,1,res); }}}
the code above gives me only "+" as the first occurrence character after string compare is match,
I want to get "+628987654321" complete string.
anyone here can share me the knowledge?
thanks.
---------- Post added at 20:41 ---------- Previous post was at 20:36 ----------
And actually I have implicit conversion of INT to PTR issue in