Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: Retrieving UART data on LCD using PIC16F877A #11529
    Guderz90
    Participant

    ok, thanks very much

     

    in reply to: Retrieving UART data on LCD using PIC16F877A #11515
    Guderz90
    Participant

    ok thanks. But would that be the cause for the problem?

    in reply to: Retrieving UART data on LCD using PIC16F877A #11506
    Guderz90
    Participant

    Thanks

    My RAM usage is 30% (70% is free). I used this copy2Ram method to reduce my RAM usage. Maybe it might be one of the causes.

    Below is the method I used and how the code would look like:

    const char UART_txt1[] = "AT";
    const char UART_txt2[] = "AT+CMGF=1";
    const char UART_txt3[] = "AT+CMGS=\"0772166326\"";
    const char UART_txt4[] = "Patient has fallen, provide assistance";
    
    //..................................................................................................................
    
    char * CopyConst2Ram(char * dest, const char * src)
    {
      char * d ;
      d = dest;
      for(;*dest++ = *src++;);
      return d;
    }
    //..................................................................................................................
    
    UART1_Write_Text(CopyConst2Ram(msg, UART_txt1));
    UART1_Write(0X0D);
    Delay_ms(1000);
    UART1_Write_Text(CopyConst2Ram(msg, UART_txt9));
    UART1_Write(0X0D);
    Delay_ms(1000);
    UART1_Write_Text(CopyConst2Ram(msg, UART_txt2));
    UART1_Write(0X0D);
    Delay_ms(1000);
    UART1_Write_Text(CopyConst2Ram(msg, UART_txt3));
    UART1_Write(0X0D);
    UART1_Write_Text(CopyConst2Ram(msg, UART_txt5));
    UART1_Write(0X1A);
    UART1_Write(0X0D);
    Delay_ms(4000);
    
    in reply to: Retrieving UART data on LCD using PIC16F877A #11497
    Guderz90
    Participant

    ok, here is the code:

    UART1_Write_Text("AT");
    UART1_Write(0X0D);
    Delay_ms(1000);
    UART1_Write_Text("ATE0");
    UART1_Write(0X0D);
    Delay_ms(1000);
    UART1_Write_Text("AT+CMGF=1");
    UART1_Write(0X0D);
    Delay_ms(1000);
    UART1_Write_Text("AT+CMGS=\"0772166326\"");
    UART1_Write(0X0D);
    UART1_Write_Text("Patient has fallen, provide assistance");
    UART1_Write(0X1A);
    UART1_Write(0X0D);
    Delay_ms(4000);
    
    in reply to: Retrieving UART data on LCD using PIC16F877A #11477
    Guderz90
    Participant

    Hi, l am sending messages with a PIC but the AT commands are being included in the received text.

    A screenshot of the message has been attached.

    Thank you in advance.

Viewing 5 posts - 1 through 5 (of 5 total)
>