SparkFun Forums 

Where electronics enthusiasts find answers.

Your source for all things Atmel.
By chadharris
#50915
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 (http://www.sparkfun.com/commerce/produc ... 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.

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

PICAXE 08M
http://www.sparkfun.com/commerce/produc ... 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

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

dial:
    serout TX_PIN, TX_BAUD, ("AT",13,10)
    serout TX_PIN, TX_BAUD, ("AT xxxxxx",13,10)
dloop:
    if BUTTON_PIN = 0 then dloop ' Wait for button to be released
    goto main
By chadharris
#52024
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!