diff options
-rw-r--r-- | software/ttx/ttx.asm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/software/ttx/ttx.asm b/software/ttx/ttx.asm index 0100a13..69f56cf 100644 --- a/software/ttx/ttx.asm +++ b/software/ttx/ttx.asm @@ -44,7 +44,7 @@ ESPACE EQU .256 - .29 CSPACE EQU .256 - .87 WSPACE EQU .256 - .203 ENABLE_TIME EQU .256 - .10 -BEACON_INT EQU .10 ; *2 = Beacon Interval in seconds +BCONINT_DEF EQU .10 ; *2 = Beacon Interval in seconds ;; I/O Pins CWENABLE EQU GP0 @@ -66,6 +66,7 @@ PENTLECNT EQU H'0047' BUF EQU H'0050' ;; all pages +BEACON_INT EQU H'0079' STATE EQU H'007A' BEACONCNTH EQU H'007B' BEACONCNTL EQU H'007C' @@ -109,7 +110,7 @@ tmr1_int disable_tmr1 bcf T1CON,TMR1ON - movlw BEACON_INT + movf BEACON_INT,w movwf SECCNT interrupt_end @@ -152,13 +153,15 @@ init bcf GPIO,CWOUT bcf GPIO,CWENABLE - movlw BEACON_INT + movf BEACON_INT,w movwf SECCNT clrf STATE ; TODO: read State from EEPROM clrf BEACONCNTL ; TODO: read Beaconcnt from EEPROM clrf BEACONCNTH - + movlw BCONINT_DEF ; TODO: read Beacon Interval from EEPROM + movwf BEACON_INT + btfss STATE,safe ; safe mode -> disable scheduler bsf T1CON,TMR1ON @@ -589,7 +592,7 @@ main goto powerdown ;; this gets called every 2*BEACON_INT seconds - movlw BEACON_INT + movf BEACON_INT,w movwf SECCNT call send_beacon |