Could anyone give me an example of using 'at' commands with usart.
I use assembly.
I have received a gt-100 gsm modem and would like to use it to send sms
with data recorded by my pic18f4520. I have looked at nigels tutorial and it seems that i must send a text string. I have the 'at' command for the unit but not to sure how to send them from a pic. The unit has a rs232 port built in and some software to send from a pc via 'at' command. I will use a max232 to change the signal from the pic to the correct levels.
Check out Tutorial 7.2 which shows how to send text strings, if you want to use the hardware UART instead of a software one, 7.7a shows how to do that.
Funnily enough I'm currently in the process of developing a commercial application using a GSM modem chip, so I've been sending a lot of strings to a modem (vis RS232 so far, while I'm waiting for a board with the modem chip we're using to arrive).
I started sending text to the gsm unit and could not end the text
here is the AT-Command set used in the AT-command manual
AT+CMGS=1 ; SET TO TEXT MODE
AT+CMGS="0171112233" <CR>
> THIS THE TEXT <CTRL-Z / ESC>
THE PROBLEM I HAVE IS HOW TO SEND <CR> AND <CTRL-Z / ESC> FROM A PIC.
I ASSUME THE <CR> IS ENTER (CARRIGE RETURN)
BUT HAVE NO IDEA WHAT <CTRL-Z> IS
I have started to do the program for the at-commands but have hit a brick wall. When running the text3 table the program has a stack overflow. I am using a pic18f4520. I have attached the code, if someone would be so kind to point out the problem and explain how to fix it i would be greatful.\
I haven't used the 18F series for a while now, but don't you have to access tables completely differently to the 16F series?.
I'm now using the enhanced 16F series (16F1827), and that has 16 bit pointers which allow you to directly access program memory (or GPR memory) in a linear fashion with no concern over page boundaries.
From what i can understand there are no page boundiers in the 18f series that what make it simple to use. If i am wrong please correct me.
There is another way to work with tables in the 18f series but can't get it to work. In one of my ealier posts augustin tomas gave a few examples but i can't get them to work.
The 18F still has banking and paging, but it's less restrictive than the older 16F series.
This is an example of how the enhanced 16F series can do strings - with no limitations at all - this shows two of my strings, sent via a common send routine.
Code:
CMGD_String
movlw high String18 ; point FSR1 at string location
movwf FSR1H
movlw low String18
movwf FSR1L
bra Send_String
Volts_String
movlw high String16 ; point FSR1 at string location
movwf FSR1H
movlw low String16
movwf FSR1L
Send_String ; send string until 0x00 found
moviw FSR1++ ; read each GPR in turn
xorlw 0x00 ; is it a zero?
btfsc STATUS, Z
return ; yes, end of string
call XMIT_RS232 ; display each GPR
bra Send_String ; get next character
There is another way to work with tables in the 18f series but can't get it to work. In one of my ealier posts augustin tomas gave a few examples but i can't get them to work.
I would be most greatfull. I am at the point were i am ready to kill. I will be searching the net in the mean time for examples or something that will help me.
Well no luck finding something meaningful.
Can somebody please post a working example of a table.
I want to send alot of diffrent measages out of a rs232 port to a gsm modem (hyperterminal to check first).the text can be upto 30 characters long.