Sending SMS using PIC18F452

This is a discussion on Sending SMS using PIC18F452 within the C Programming forums, part of the General Programming Boards category; Code: void sendAT() { TRISB = 0x00; //initialize PORTB as output PORTB = 0x00; PIR1bits.RCIF = 0x00; //Clear PORTB printf("at+cnmi ...

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    1

    Sending SMS using PIC18F452

    Code:
    void sendAT()
    {
    	TRISB = 0x00;		    //initialize PORTB as output
    	PORTB = 0x00;	
    	PIR1bits.RCIF = 0x00;	    //Clear PORTB 
    	printf("at+cnmi = 2,2,0,0,1\r\n");
                    Delay10KTCYx(100);                     //Delay
    	while (!PIR1bits.RCIF)	     //Test to see if AT command is sent
    	continue;			     //looping
    	PORTB = PIR1bits.RCIF; 				
                    //LED of RBO will light up if command is sent
    	Delay10KTCYx(100);
    	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: 
    
    AT+CMGS="+yyyyy" <Enter>
    > Your SMS text message here <Ctrl-Z>
    
    Does anyone out there know how do i input this AT command into the printf line?

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    Have you tried \" ?
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sending data - line by line?
    By tuckker in forum C Programming
    Replies: 0
    Last Post: 02-21-2009, 09:31 PM
  2. SMS sample code
    By hagenuk in forum C Programming
    Replies: 1
    Last Post: 05-30-2008, 12:47 PM
  3. a doubt about sending an array to a function
    By louis_mine in forum C Programming
    Replies: 13
    Last Post: 05-15-2005, 12:50 AM
  4. Sms
    By Joanna in forum Tech Board
    Replies: 5
    Last Post: 08-31-2004, 08:25 AM
  5. SMS provider that offer SMS shipping world-wide for under 0,05 € ???
    By gicio in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 05-26-2003, 09:26 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21