PDA

View Full Version : GE865 Evaluation Board



KARIM102
07-31-2010, 05:44 PM
Dear all,
does anyone know about GSM "GE865 Evaluation Board"??
I wanna know which software should i use with this boad??? I wanna use this GSM with basic stamp#2 to control lighting in my home by using sms order??? plz tell me the highlight to use the GSM model???

best wishes,
thx

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Leon
07-31-2010, 09:49 PM
Have you read the GE865 documentation? Everything you need is there. I didn't have any problems using the similar GE863.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM

KARIM102
07-31-2010, 11:57 PM
Ok but why software have u used???

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Leon
08-01-2010, 12:50 AM
I wrote my own in assembler for the PIC16F88.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM

KARIM102
08-01-2010, 01:00 AM
sorry but i meant what software have u used????? thx mate

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Leon
08-01-2010, 01:17 AM
I don't understand what you mean. I told you what software I used.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM

KARIM102
08-01-2010, 02:36 AM
PIC16F88!!!! this is the software mate.... i thought it's transistor sorry but where can i download it??? thx a lot

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

KARIM102
08-01-2010, 02:36 AM
PIC16F88!!!! this is the software mate.... i thought it's transistor sorry but where can i download it??? thx a lot

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Leon
08-01-2010, 03:01 AM
It won't be much use to you if you are using a Stamp.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM

KARIM102
08-01-2010, 04:12 AM
ok i see, why could i see the basic command for ge865?? to use it with basic stamp thx

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Leon
08-01-2010, 04:15 AM
Here is my test code:




;================================================= ============================
; Filename: GSM.asm
;================================================= ============================
;
; Test software for Telit GE863-GPS module GSM function
;
; MCU: 16F88
;
; Author: Leon Heller
; Company:
;
; Revision: 1.00
; Date: August 7, 2007
; Initial working version
;
; Revision:
; Date:
;
;
; Assembled using MPASMWIN V5.02
;
; Home number: ATDT01424714790
; Mobile number: ATDT07890408969
;================================================= ============================


;================================================= ============================
; Include Files: p16f88.inc
;================================================= ============================


list p=16f88 ;list directive to define processor
#include <p16f88.inc> ;processor specific definitions
errorlevel -302 ;suppress "not in bank 0" message


;----------------------------------------------------------------------------
;Constants
SPBRG_VAL EQU .11 ;set baud rate to 38,400 for 7.3728 Mhz clock
CR EQU 0x0D
LF EQU 0x0A
DLY_COUNT EQU 0xFF
Timeout_100ms EQU .10
Timeout_5s EQU .255

;----------------------------------------------------------------------------
;#defines

#define INIT_COUNT D'0' ;gives ~10 ms between interrupts
#define LED 3

;----------------------------------------------------------------------------
;Bit Definitions

GotNewData EQU 0 ;bit indicates new data received

;----------------------------------------------------------------------------
;Variables

CBLOCK 0x020
Flags
counter
delay_counter1
delay_counter2
MSGPTR
Terminator
Temp
Timeout
TimeoutCounter
Buffer: 50
ENDC



;----------------------------------------------------------------------------
;This code executes when a reset occurs.

;reset vector
org 0
clrf PCLATH
goto main

;----------------------------------------------------------------------------
;interrupt vector
org 4
banksel INTCON
bcf INTCON,TMR0IF ;clear Timer0 interrupt flag
movlw INIT_COUNT ;re-initialise count
movwf TMR0
incf TimeoutCounter,f;inc. timeout counter
movfw Timeout ;timed out?
subwf TimeoutCounter,w
skpz ;no, return
retfie
bsf Flags,0 ;yes, set timeout flag
retfie


;----------------------------------------------------------------------------

main:
;------------------------------------------------------------------
;initialisation

banksel OPTION_REG
movlw b'00000111' ;prescaler 1/256
movwf OPTION_REG ;giving 7.3728 Mz/256 = 28800 Hz (period = 35 us)
banksel TMR0
movlw INIT_COUNT ;initialise timer count value
movwf TMR0
bsf INTCON,TMR0IE ;enable Timer0 interrupt
banksel PORTA
bcf PORTA,LED
banksel TRISA
bcf TRISA,LED ;RA3 (Error LED) output
call ClearBuffer
banksel Flags
clrf W
movwf Flags
call SetupSerial ;set up serial port and buffers
bsf INTCON,GIE ;enable global interrupt


;-------------------------------------------------------------------------
;send commands to GSM


;initial check (100ms timeout)
call ClearBuffer
call OUTMSG1 ;send AT
call Timeout100ms
main1:
call ReceiveSerial ;get char in W
movwf INDF ;save in buffer
movwf Temp
incf FSR,F ;bump pointer
btfss Flags,0 ;timeout flag set?
goto main1 ;no, try to get more chars
call dly ;yes, continue


nop


;enable extended error result codes (100ms timeout)
call ClearBuffer
call OUTMSG2 ;send AT+CMEE=1
call Timeout100ms
main2:
call ReceiveSerial ;get char in W
movwf INDF ;save in buffer
movwf Temp
incf FSR,F ;bump pointer
btfss Flags,0 ;timeout flag set?
goto main2 ;no, try to get more chars
call dly ;yes, continue

nop

;Check SIM presence
call ClearBuffer
call OUTMSG3 ;send AT+CPIN?
call Timeout100ms
main3:
call ReceiveSerial ;get char in W
movwf INDF ;save in buffer
movwf Temp
incf FSR,F ;bump pointer
btfss Flags,0 ;timeout flag set?
goto main3 ;no, try to get more chars
call dly ;yes, continue

nop

;query network status (5s timeout)
;returns +CREG 0,1 if OK
call ClearBuffer
call OUTMSG4 ;send AT+CREG?
clrf TimeoutCounter
call Timeout5s
main4:
call ReceiveSerial ;get char in W
movwf INDF ;save in buffer
movwf Temp
incf FSR,F ;bump pointer
btfss Flags,0 ;timeout flag set?
goto main4 ;no, try to get more chars
call dly ;yes, continue

nop


;Test
call ClearBuffer
call SCRATCH ;send AT+CMGF=1
call Timeout5s
main5:
call ReceiveSerial ;get char in W
movwf INDF ;save in buffer
movwf Temp
incf FSR,F ;bump pointer
btfss Flags,0 ;timeout flag set?
goto main5 ;no, try to get more chars
call dly ;yes, continue

nop

;Check SMS Service Centre Number
;Returns +CSCA:<number>,<type>
call ClearBuffer
call OUTMSG6 ;send AT+CMGF=1
call Timeout100ms
main6:
call ReceiveSerial ;get char in W
movwf INDF ;save in buffer
movwf Temp
incf FSR,F ;bump pointer
btfss Flags,0 ;timeout flag set?
goto main6 ;no, try to get more chars
call dly ;yes, continue


nop




goto _Error

;----------------------------------------------------------------------------
;Set up serial port.

SetupSerial:
banksel TRISB
movlw 0x04 ;set tris bits for TX and RX
iorwf TRISB,F
movlw SPBRG_VAL ;set baud rate
movwf SPBRG
movlw 0x24 ;enable transmission and high baud rate
movwf TXSTA
banksel RCSTA
movlw 0x90 ;enable serial port and reception
movwf RCSTA
return

;----------------------------------------------------------------------------
;Check if data received and if so, return it in the working register.

ReceiveSerial:
banksel Flags
btfsc Flags,0 ;timeout flag set?
return ;yes, return
banksel PIR1
btfss PIR1,RCIF ;check if data
goto ReceiveSerial
btfsc RCSTA,OERR ;if overrun error occurred
goto ErrSerialOverr ; then go handle error
btfsc RCSTA,FERR ;if framing error occurred
goto ErrSerialFrame ; then go handle error
movf RCREG,W ;get received data
return


ReceiveSerialWait:
banksel PIR1
btfss PIR1,RCIF ;check if data
goto ReceiveSerialWait
movf RCREG,W ;get received data
return


;error because OERR overrun error bit is set
;can do special error handling here - this code simply clears and continues

ErrSerialOverr:
bcf RCSTA,CREN ;reset the receiver logic
bsf RCSTA,CREN ;enable reception again
return

;error because FERR framing error bit is set
;can do special error handling here - this code simply clears and continues
ErrSerialFrame:
movf RCREG,W ;discard received data that has error
return

;-------------------------------------------------------------

Timeout100ms:
clrf TimeoutCounter
movlw Timeout_100ms
movwf Timeout
bcf Flags,0 ;clear timeout flag
movlw Buffer ;initialise buffer pointer
movwf FSR
return

;--------------------------------------------------------------

Timeout5s:
clrf TimeoutCounter
movlw Timeout_5s
movwf Timeout
bcf Flags,0 ;clear timeout flag
movlw Buffer ;initialise buffer pointer
movwf FSR
return




;----------------------------------------------------------------------------
;Transmit data in WREG when the transmit register is empty.

TransmitSerial:
banksel PIR1
btfss PIR1,TXIF ;check if transmitter busy
goto $-1 ;wait until transmitter is not busy
movwf TXREG ;and transmit the data
return



;---------------------------------------------------------------------------
;ClearBuffer
ClearBuffer:
movlw Buffer
movwf FSR
movlw .50
movwf counter
Clear1:
movlw 0x00
movwf INDF
incf FSR,f
decf counter,f
bz Clear2
goto Clear1
Clear2:
return


;-----------------------------------------------------------
;Initial check - send AT
;-----------------------------------------------------------
OUTMSG1
clrf MSGPTR ; put 'W' into message pointer
MSG1_LOOP
MOVF MSGPTR, W ; put the offset in 'W'
CALL MSG1 ; returns ASCII character in 'W'
ADDLW 0 ; sets the zero flag if W = 0
BTFSC STATUS, Z ; skip if zero bit not set
RETURN ; finished if W = 0
CALL TransmitSerial ; output the character
INCF MSGPTR, f ; point at next
GOTO MSG1_LOOP ; more characters


MSG1 ADDWF PCL,f ; offset added to PCL

dt "AT",CR,0

;-----------------------------------------------------------------
;Enable extended error result codes
;-----------------------------------------------------------------
OUTMSG2
clrf MSGPTR ; put 'W' into message pointer
MSG2_LOOP
MOVF MSGPTR, W ; put the offset in 'W'
CALL MSG2 ; returns ASCII character in 'W'
ADDLW 0 ; sets the zero flag if W = 0
BTFSC STATUS, Z ; skip if zero bit not set
RETURN ; finished if W = 0
CALL TransmitSerial ; output the character
INCF MSGPTR, f ; point at next
GOTO MSG2_LOOP ; more characters


MSG2 ADDWF PCL,f ; offset added to PCL

dt "AT+CMEE=1",CR,0

;----------------------------------------------------------------
;Check SIM presence
;----------------------------------------------------------------
OUTMSG3
clrf MSGPTR ; put 'W' into message pointer
MSG3_LOOP
MOVF MSGPTR, W ; put the offset in 'W'
CALL MSG3 ; returns ASCII character in 'W'
ADDLW 0 ; sets the zero flag if W = 0
BTFSC STATUS, Z ; skip if zero bit not set
RETURN ; finished if W = 0
CALL TransmitSerial ; output the character
INCF MSGPTR, f ; point at next
GOTO MSG3_LOOP ; more characters


MSG3 ADDWF PCL,f ; offset added to PCL

dt "AT+CPIN?",CR,0


;-------------------------------------------------------------------
;Query network status
;-------------------------------------------------------------------
OUTMSG4
clrf MSGPTR ; put 'W' into message pointer
MSG4_LOOP
MOVF MSGPTR, W ; put the offset in 'W'
CALL MSG4 ; returns ASCII character in 'W'
ADDLW 0 ; sets the zero flag if W = 0
BTFSC STATUS, Z ; skip if zero bit not set
RETURN ; finished if W = 0
CALL TransmitSerial ; output the character
INCF MSGPTR, f ; point at next
GOTO MSG4_LOOP ; more characters


MSG4 ADDWF PCL,f ; offset added to PCL

dt "AT+CREG?",CR,0

;---------------------------------------------------------------
;Dial number
;---------------------------------------------------------------
OUTMSG5
clrf MSGPTR ; put 'W' into message pointer
MSG5_LOOP
MOVF MSGPTR, W ; put the offset in 'W'
CALL MSG5 ; returns ASCII character in 'W'
ADDLW 0 ; sets the zero flag if W = 0
BTFSC STATUS, Z ; skip if zero bit not set
RETURN ; finished if W = 0
CALL TransmitSerial ; output the character
INCF MSGPTR, f ; point at next
GOTO MSG5_LOOP ; more characters


MSG5 ADDWF PCL,f ; offset added to PCL

dt "ATDT01424714790",CR,0


;------------------------------------------------------------
OUTMSG6
clrf MSGPTR ; put 'W' into message pointer
MSG6_LOOP
MOVF MSGPTR, W ; put the offset in 'W'
CALL MSG6 ; returns ASCII character in 'W'
ADDLW 0 ; sets the zero flag if W = 0
BTFSC STATUS, Z ; skip if zero bit not set
RETURN ; finished if W = 0
CALL TransmitSerial ; output the character
INCF MSGPTR, f ; point at next
GOTO MSG6_LOOP ; more characters


MSG6 ADDWF PCL,f ; offset added to PCL

dt "AT+CMGF=1",CR,0


;------------------------------------------------------------
SCRATCH
clrf MSGPTR ; put 'W' into message pointer
SCRATCH_LOOP
MOVF MSGPTR, W ; put the offset in 'W'
CALL SCRATCH_MSG; returns ASCII character in 'W'
ADDLW 0 ; sets the zero flag if W = 0
BTFSC STATUS, Z ; skip if zero bit not set
RETURN ; finished if W = 0
CALL TransmitSerial ; output the character
INCF MSGPTR, f ; point at next
GOTO SCRATCH_LOOP ; more characters


SCRATCH_MSG ADDWF PCL,f ; offset added to PCL

dt "ATDT01424714790",CR,0


_Error:
banksel PORTA
bsf PORTA,LED
goto _Error


;wait for RING
wait_for_ring:
call ClearBuffer
banksel FSR
movlw Buffer ;initialise buffer pointer
movwf FSR
aaa:
call ReceiveSerialWait ;get char in W
banksel INDF
movwf INDF ;save in buffer
movwf Temp
banksel FSR
incf FSR,F ;bump pointer
movfw Buffer+2 ;'R'?
movwf Temp
movlw 'R'
subwf Temp,w
skpz
goto aaa
goto _Error


dly:
return

movlw 0xFF
movwf delay_counter1
dly0:
movlw 0xFF
movwf delay_counter2
dly1:
decfsz delay_counter2,f
goto dly1
decfsz delay_counter1,f
goto dly0
return

END


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM

KARIM102
08-01-2010, 09:54 AM
thx

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔