SparkFun Forums 

Where electronics enthusiasts find answers.

Your source for all things Atmel.
By chadharris
If there is anyone out there that is gracious enough to help me write some simple could I would be in debt to you and greatly appreciate it! Please?

Basically I just need to write some code to program to a microcontroller (PIC, AVR, etc.) that will send specific serial AT commands to the GM862 Cellular Quad Band Module ( ... cts_id=757)

For example. I have a button and when I press that button I want the end result to be that the cellular module makes a call to a certain number. So my thinking is that a microcontroller is program to "fire off" the necessary serial line commands to make this happen. I know nothing about programing, I've tried to learn and it's becoming pretty frusterating. If anyone could help, please please.. I'm begging.

By riden
It's not an AVR approach, but it's cheap, quick, and easy:

PICAXE 08M ... ts_id=8308
Code: Select all
' Connect a 10k resistor from BUTTON_PIN to VDD (+3v)
' Connect a button between BUTTON_PIN and VDD (gnd)

symbol BUTTON_PIN = 1      ' Pin to use for the button
symbol TX_PIN     = 2      ' Pin to use for serial output
symbol TX_BAUD    = N2400  ' Baud rate and logic inversion setting

    input BUTTON_PIN
    if BUTTON_PIN = 0 then dial ' Wait for button to be pressed
    goto mloop

    serout TX_PIN, TX_BAUD, ("AT",13,10)
    serout TX_PIN, TX_BAUD, ("AT xxxxxx",13,10)
    if BUTTON_PIN = 0 then dloop ' Wait for button to be released
    goto main
By chadharris
Sorry for the incredibly late reply but I wanted to thank you for taking the time to help me out!! I haven't tried using the code yet but I will let you know the outcome when I do. Thanks again!