sribangaram
Full Member level 5
- Joined
- Apr 29, 2012
- Messages
- 297
- Helped
- 7
- Reputation
- 14
- Reaction score
- 7
- Trophy points
- 1,298
- Location
- INDIA.:/;:'" VIJAYAWADA
- Activity points
- 3,754
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 //GSM interfacing with PIC16f628A //Developed by i-St@r Electronics //www.circuitsgalley.com void send_sms() { Uart1_Write_TEXT("AT\r"); Uart1_Write('\n'); Delay_ms(1000); Uart1_Write_TEXT("AT+CMGF=1\r"); Uart1_Write('\n'); Uart1_Write_TEXT("AT+CMGS="9544094745"\r"); Uart1_Write('\n'); Uart1_Write_TEXT("Hello\r"); Uart1_Write_TEXT("i-St@r\r"); Uart1_Write('\n'); Uart1_Write(26); } void call() { Uart1_Write_TEXT("AT\r"); Uart1_Write('\n'); Delay_ms(1000); Uart1_Write_TEXT("ATD9544094745;\r"); Uart1_Write('\n'); Delay_ms(5000); } void main() { TRISB.F0=0; TRISB.F1=1; TRISB.F2=0; TRISB.F3=1; TRISB.F4=1; TRISB.F5=0; TRISB.F6=0; PORTB.F0=0; PORTB.F2=0; PORTB.F5=0; PORTB.F6=0; Uart1_init(9600); Delay_ms(5000); Uart1_Write_TEXT("AT\r"); Uart1_Write(13); Uart1_Write(10); Delay_ms(1000); Uart1_Write_TEXT("AT+CMGF=1\r"); Uart1_Write(13); Uart1_Write(10); Delay_ms(1000); Uart1_Write_TEXT("AT+CNMI=2,2,0,0,0\r"); Uart1_Write(13); Uart1_Write(10); Delay_ms(3000); PORTB.F6=1; while(1) { if(PORTB.F3==0) { PORTB.F0=1; call(); Delay_ms(6000); PORTB.F0=0; } if(PORTB.F4==0) { PORTB.F5=1; send_sms(); Delay_ms(2000); PORTB.F5=0; } } }
"AT+CMGS="9544094745"\r"
"AT+CMGS="9544094745"\r"
I have tested it in Proteus and it is working. What Clock frequency are you using ?