diff options
author | Christian Pointner <equinox@mur.at> | 2012-06-18 17:49:44 +0000 |
---|---|---|
committer | Christian Pointner <equinox@mur.at> | 2012-06-18 17:49:44 +0000 |
commit | a494031a3e2f1c832d1b64448046b6a5ce1f4fc8 (patch) | |
tree | aa78f8b907d2d9c7cc89966028ee7c888051306f /software | |
parent | added output code (diff) |
timer start stop through DBG0 pin
git-svn-id: https://svn.spreadspace.org/mur.sat@539 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software')
-rw-r--r-- | software/idm/idm.asm | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/software/idm/idm.asm b/software/idm/idm.asm index 6176324..e039861 100644 --- a/software/idm/idm.asm +++ b/software/idm/idm.asm @@ -343,7 +343,7 @@ endif movlb b'00000001' movlw b'00101111' movwf TRISA - movlw b'01110010' + movlw b'01110011' movwf TRISB movlw b'01010000' ; Left Justified, FOSC/16, NEG=VSS,POS=VDD movwf ADCON1 @@ -351,7 +351,8 @@ endif movwf ADCON0 movlw b'00001010' ; SSPIE,TMR2IE movwf PIE1 - + bcf OPTION_REG,NOT_WPUEN + ;; BANK 0 movlb b'00000000' movlw .124 ; 8 kHz @ 16MHz @@ -366,12 +367,23 @@ endif bcf FILTER_EN call buf_init - bsf T2CON,TMR2ON bsf INTCON,GIE ;; ------------------------------------- ;; MAINLOOP main +if DEBUG == 1 + btfss DBG0 + goto enable_t2 + + btfsc T2CON,TMR2ON + bcf T2CON,TMR2ON + goto main + +enable_t2 + btfss T2CON,TMR2ON + bsf T2CON,TMR2ON +endif goto main ;; ------------------------------------- |