I was able to make the led blink every time the scex string is sent (it is sent 8 times every 1 1/2 seconds). The purpose of the led is so I can monitor If I succeed in making the chip send it 40 times then sleep. But the way the loop is done and my lack of knowledge in asm are keeping me from doing so LOL... At least I got the led working LOL... I can make it sleep and wake up I just can't figure out this loop:
If anybody can point me in the right direction I'll be happy... LOL
Code:
;======================================================================
; CODE THAT ALLOWS THE USE OF ORIGINALS AND BACKUPS
; (DEPENDS ON HOW THE CONSOLE WAS POWERED ON)
;======================================================================
OPTION2
bcf GPIO,1 ;INIT PORT TXSERIES HIGH
bcf x15,1
movf x15,W
tris GPIO ;
LOOP
bsf x15,1
movf x15,W
tris GPIO
movlw 30 ;SEND "SCEX" EVERY 1 1/2 SECS
movwf x0D
ETI_o
call PAUSE50MSG
btfss GPIO,3 ;IF RESET IS PRESSED
goto OPTION2 ;GO TO OPTION2
decfsz x0D,F
goto ETI_o
movlw 8 ;WILL SEND "SCEX" 8 TIMES
movwf x0D
ETI_122 ;
clrf x14 ;INIT POINTER TO TABLE AND SENDS
call SENDSCEX ;"SCEX" STRING INFINITELY
btfss GPIO,3 ;IF RESET IS PRESSED
goto OPTION2 ;GO TO OPTION2
decfsz x0D,F
goto ETI_122
goto LOOP
;======================================================================
SENDSCEX
;======================================================================
; BLINK LED (HOPE I'M DOING IT RIGHT)
;======================================================================
movlw b'101101' ; configure output
tris GPIO
movlw b'010010' ; set GP1 and GP4 high
movwf GPIO
;======================================================================
;SCEX CODE STARTS BELOW
;======================================================================
