It is currently 23 Feb 2019 13:46

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 05 Jan 2019 12:47 
Offline

Joined: 26 Dec 2017 13:04
Posts: 7
Hi All,

I appreciate if you help me OR post Coding to send and receive sms using SIM800C and PIC18f452 in MikroC pro when sms receive it should display on LCD, and also Turn ON Led on receive of sms



thanks in advance
Ulfat Hussain


Top
 Profile  
 
PostPosted: 08 Jan 2019 17:12 
Offline
mikroElektronika team
User avatar

Joined: 18 Dec 2018 10:36
Posts: 101
Hello,

You can look at some of our examples and adapt them to your project:
https://libstock.mikroe.com/projects/view/463/gsm-click
https://libstock.mikroe.com/projects/vi ... sm-3-click
https://libstock.mikroe.com/projects/vi ... sm-2-click

Kind regards,
Jovana


Top
 Profile  
 
PostPosted: 19 Jan 2019 09:49 
Offline

Joined: 26 Dec 2017 13:04
Posts: 7
Hello Jovana,

Thank you!

I tried following code to send sms from SIM800c to Mobile, it is working. Now I want to send back sms from mobile to Sim800c
I need your help for coding of sending sms from Mobile to SIM800c

Code to send sms from SIM800C to Mobile
sbit Lcd_Rs at RC4_bit;

sbit lcd_en at Rc5_bit;
sbit lcd_d4 at rc0_bit;
sbit lcd_d5 at rc1_bit;
sbit lcd_d6 at rc2_bit;
sbit lcd_d7 at rc3_bit;

sbit Lcd_Rs_direction at TRISC4_bit;
sbit Lcd_EN_direction at TRISC5_BIT;
sbit LCD_D4_Direction at TRISC0_bit;
sbit LCD_D5_Direction at TRISC1_bit;
sbit LCD_D6_Direction at TRISC2_bit;
sbit LCD_D7_Direction at TRISC3_bit;

void main()
{
 TRISD = 0;
 TRISC = 0;
 PORTC=0 ;
 LCD_Init();
 Lcd_Cmd(_LCD_CLEAR);
 UART1_Init(9600);
 Lcd_Out(1,1,"Hello");
 UART1_Write_Text("ATE0");
  Lcd_Out(2,1,"ATE0");
 UART1_Write(13);
 UART1_Write(10);
 Delay_ms(5000);
           Lcd_Cmd(_LCD_CLEAR);
         UART1_Write_Text("AT+CMGF=1");
          Lcd_Out(2,1,"AT+CMGF=1");
         UART1_Write(13);
         UART1_Write(10);
         Delay_ms(5000);
         Lcd_Cmd(_LCD_CLEAR);
  //while(1){
 UART1_Write_Text("AT+CMGS=") ;
  Lcd_Out(2,1,"AT+CMGS=");
  Delay_ms(2000);
 UART1_Write_Text("\"+93785059322\"");
  UART1_Write(13);
 UART1_Write(10);
 Delay_ms(2000);
    Lcd_Cmd(_LCD_CLEAR);
 UART1_Write_Text("HI Good Morning");
   UART1_Write(26) ;
 Delay_ms(2000);

 //}
 }


Top
 Profile  
 
PostPosted: 09 Feb 2019 12:33 
Offline

Joined: 26 Dec 2017 13:04
Posts: 7
Hello Jovana,

I have wrote below code to receive sms using SIM800c and PIC18f452, when sms send from mobile it is looking sms received but it is not showing on LCD 16X2.

I appreciate if you help me for correcting the code to receive sms and display on LCD 16x2
Following is the code
sbit Lcd_Rs at RC4_bit;
sbit lcd_en at Rc5_bit;
sbit lcd_d4 at rc0_bit;
sbit lcd_d5 at rc1_bit;
sbit lcd_d6 at rc2_bit;
sbit lcd_d7 at rc3_bit;

sbit Lcd_Rs_direction at TRISC4_bit;
sbit Lcd_EN_direction at TRISC5_BIT;
sbit LCD_D4_Direction at TRISC0_bit;
sbit LCD_D5_Direction at TRISC1_bit;
sbit LCD_D6_Direction at TRISC2_bit;
sbit LCD_D7_Direction at TRISC3_bit;


void main()
{

char uart_rd;
char temp;

 TRISD = 0;
 TRISC = 0;
 PORTC=0 ;
 LCD_Init();
 Lcd_Cmd(_LCD_CLEAR);
 UART1_Init(9600);
 Lcd_Out(1,1,"Hello");
 UART1_Write_Text("ATE0");
  Lcd_Out(2,1,"ATE");
 UART1_Write(13);
 UART1_Write(10);
 Delay_ms(2000);

           Lcd_Cmd(_LCD_CLEAR);
         UART1_Write_Text("AT+CMGF=1");
          Lcd_Out(2,1,"AT+CMGF=1");
         UART1_Write(13);
         UART1_Write(10);
         Delay_ms(2000);
       
         UART1_Write_Text("AT+CMGR=1");
         UART1_Write(13);
         UART1_Write(10);
           Delay_ms(10);
       
 while(1){
   
   if (UART1_Data_Ready() == 1) {
    uart_rd= UART1_Read();
    temp=uart_rd;
Lcd_Cmd(_LCD_CLEAR); // if data is received
Lcd_Out(1,1,temp);
 UART1_Write_Text(temp);
delay_ms(1000);

}
} }


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: