1. You can now buy finished microcontroller project from us, Check out the Store for the complete list of projects.
  2. Need a custom project, Send us some details about your project. So that we can quote the price for it.

Need Help Regarding AT Command using 8051

Discussion in 'Microcontrollers' started by sajidraheem, Jun 16, 2007.

  1. sajidraheem

    sajidraheem New Member

    Likes Received:
    0
    Trophy Points:
    0
    Hi..
    I want my mobile connected to my Microcontroller to dial a call on given number.

    The code I am using is:

    ;-----------------------------------------------
    ORG 0000H ;Power up
    MAIN:
    MOV TMOD,#20H ;Timer 1 in mode 2
    MOV TH1,#-3 ;9600 baud rate
    SETB TR1 ;Start timer 1
    MOV SCON,#50H ;8-bit, 1 stop bit, REN enabled
    DIAL:
    MOV DPTR,#PhoneNum
    ACALL SendString
    HangUp:
    SJMP HangUp

    PhoneNum:
    DB 'ATD 0123456789;',0Dh,0AH,00h
    SendIt:
    ACALL SEND
    SendString:
    CLR A
    MOVC A,@A+DPTR
    INC DPTR
    JNZ SendIt
    RET

    SEND:
    MOV SBUF,A ;Load the data
    HERE:
    JNB TI,HERE ;Stay until last bit sent
    CLR TI ;Get ready for next character
    RET

    END
    ;-----------------------------------------------

    The response of this code is ok when i check this on hyper terminal. But when I connect the mobile, the mobile doesnt response. Although the mobile responds when the same command is sent to it via hyper terminal.
    I dont know whats the problem.

    The command is

    ATD 123456789; (Then Enter key)
    so i have used
    DB 'ATD 0123456789;',0Dh,0AH,00h

    0Dh and 0AH for Line feed and Carriage Return
    But it isnt working.

    I have simulated the code using pinnicle's UART window, working fine

    Can Anyone help me please??? its urgent
  2. Binu

    Binu Administrator

    Likes Received:
    143
    Trophy Points:
    63
    Wats your mobile model & company. will it obeys AT commands.
    Because there are many other protocols for nokia mobile , such us M-bus, F-bus etc.

    J.Binu
Loading...

Share This Page