Sending SMS using PIC18F452
TRISB = 0x00; //initialize PORTB as output
PORTB = 0x00;
PIR1bits.RCIF = 0x00; //Clear PORTB
printf("at+cnmi = 2,2,0,0,1\r\n");
while (!PIR1bits.RCIF) //Test to see if AT command is sent
PORTB = PIR1bits.RCIF;
//LED of RBO will light up if command is sent
return RCREG; //Return RCREG value
This is a coding i've created...i need to know how to amend the printf line above to send sms.
The AT command is:
> Your SMS text message here <Ctrl-Z>
Does anyone out there know how do i input this AT command into the printf line?