Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Interfacing Nokia6310i with Microcontroller

Status
Not open for further replies.

Dr.Larq

Newbie level 3
Joined
Mar 28, 2008
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,320
microcontroller at+cmgf=1

HI I'm using an atmega16 with a nokia 6310i cell phone. I have written some code for the micro to send to a cell phone via AT commands.
Code:
unsigned char str1[] = "AT+CMGF=1";
unsigned char str2[] = "AT+CMGS="/5123333333/"";
unsigned char str3[] = "TEST!";

void main(void)
{
   UCSRA=0x00;
  UCSRB=0x18;
  UCSRC=0x86;
  UBRRH=0x00;
  UBRRL=0x19;    
         
        puts(str1);     //AT+CMGF=1
        putchar(0x0D);
        delay_ms(250);

        puts(str2);    //phone number
        putchar(0x0D);
        delay_ms(250);
        
        puts(str3);
        putchar(0x1A);   //Control-z
        delay_ms(2000);
}

Does anyone see any problem with the code? I am really having trouble connecting the phone to the microcontroller. I am using a dlr-3 cable to communicate with hyperterminal but am not sure if I need this for the microcontroller. Is the max232 used for this? Because I thought the max232 was only used to communicate with the PC. I have tested the TX pin on the micro with an oscilloscope and I am getting transmission data. Any help would be appreciated! Thanks!
 

Hi
You must use Fbus protocol and for Mcu uart (send receive) bytes
 

Do you think you could elaborate a little bit more? Thanks for the reply, but I'm a little confused about what you mean.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top