04 Initialization of TELIT GM862 module in ASSEMBLER
Initialization of TELIT GM862 module realized with MPLAB MPASM Microchip therefore ASSEMBLER
The PIC is connected to the GM862 through the UART It transmits with the TransWt routine and it receives under Interrupt (ISR) introducing the data in the RAM therefore the pointer will be reseted FSR=0xA0 (in the example comes clear the ram) To notice that in the list there are some verifications of OK answer (check_ok)
;================================================================
; Telit GM862 initialize ASM
;================================================================
setup
call clear_ramA0 ; clears the ram from A0h to EFh and 120h to 14Fh preset FSR=0xA0
call at ; at_command
call clear_ramA0
call _ipr ; fix port rate @ 9600
call clear_ramA0
call ate ; Disable command echo
call clear_ramA0
call _clip ; Enable calling line identification
call check_ok ; verify OK
SKPZ ; Z=1 OK
goto setup1 ; error --> no_ok turn off and turn on the module!
call clear_ramA0
call _cmee ; Enable extended error code =1 numeric
call clear_ramA0
call _cpin ; SIM presence checking (PIN free) READY
call clear_ramA0
call _creg ; Network checking x,1 (home) or x,5 (roaming)
call clear_ramA0
call _cmgf ; SMS format type 1=text
call clear_ramA0
call _csca ; Check SMS Center Service number
call clear_ramA0
call _cnmi ; DISABLE New message unsolicited indication +CMTI:
call clear_ramA0
call _fclass ; AT+FCLASS=8 Activate Voice mode
call clear_ramA0 ; Set TEXT mode parameters
call _csmp ; 17,167,0,0
call check_ok ; verify OK
SKPZ ; Z=1 OK
goto setup1 ; error --> no_ok turn off and turn on the module!
setup2
call clear_ramA0
call _cpbs ; AT+CPBS="SM" set phonebook normal SIM
call check_ok ; verify OK
SKPZ ; Z=1 OK
goto setup2 ; error --> no_ok loop
;###############################################


