From: ceb Date: Tue, 4 Jan 2005 22:34:05 +0000 (+0000) Subject: testing changes (timer scalings/value written in after interrupt) X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=cbd8ea45a883139b426137ad3d38e0105507a5e9;p=trains.git testing changes (timer scalings/value written in after interrupt) --- diff --git a/cebpic/nmra-stream.asm b/cebpic/nmra-stream.asm index 71749f3..4e0175a 100644 --- a/cebpic/nmra-stream.asm +++ b/cebpic/nmra-stream.asm @@ -88,13 +88,17 @@ initialise ; timer0 initial config for NMRA timer - bsf T0CON,6,0 ; p107 Timer0 -> 8bit mode + bcf T0CON,6,0 ; p107 Timer0 -> 16bit mode (testing) +; bsf T0CON,6,0 ; p107 Timer0 -> 8bit mode (not-testing) bcf T0CON,5,0 ; timer0 use internal clock bcf T0CON,3,0 ; use prescaler - bcf T0CON,2,0 ; } - bcf T0CON,1,0 ; } prescale value 1:2 - bcf T0CON,0,0 ; } +; bcf T0CON,2,0 ; } +; bcf T0CON,1,0 ; } prescale value 1:2 +; bcf T0CON,0,0 ; } (not-testing) + bsf T0CON,2,0 ; } + bcf T0CON,1,0 ; } prescale value 1:32 + bsf T0CON,0,0 ; } (testing) ;---------------------------------------------------------------------------- @@ -222,7 +226,8 @@ fromserial_overflow timer0_interrupt bcf INTCON,2,0 ; clear interrupt-set bit - movlw 0x6E + movlw 0x00 ; (testing) +; movlw 0x6E ; (not-testing) movwf W,TMR0L ; set timer0 to 0x6E (so interrupt takes 58us) diff --git a/detpic/nmra-stream.asm b/detpic/nmra-stream.asm index 71749f3..4e0175a 100644 --- a/detpic/nmra-stream.asm +++ b/detpic/nmra-stream.asm @@ -88,13 +88,17 @@ initialise ; timer0 initial config for NMRA timer - bsf T0CON,6,0 ; p107 Timer0 -> 8bit mode + bcf T0CON,6,0 ; p107 Timer0 -> 16bit mode (testing) +; bsf T0CON,6,0 ; p107 Timer0 -> 8bit mode (not-testing) bcf T0CON,5,0 ; timer0 use internal clock bcf T0CON,3,0 ; use prescaler - bcf T0CON,2,0 ; } - bcf T0CON,1,0 ; } prescale value 1:2 - bcf T0CON,0,0 ; } +; bcf T0CON,2,0 ; } +; bcf T0CON,1,0 ; } prescale value 1:2 +; bcf T0CON,0,0 ; } (not-testing) + bsf T0CON,2,0 ; } + bcf T0CON,1,0 ; } prescale value 1:32 + bsf T0CON,0,0 ; } (testing) ;---------------------------------------------------------------------------- @@ -222,7 +226,8 @@ fromserial_overflow timer0_interrupt bcf INTCON,2,0 ; clear interrupt-set bit - movlw 0x6E + movlw 0x00 ; (testing) +; movlw 0x6E ; (not-testing) movwf W,TMR0L ; set timer0 to 0x6E (so interrupt takes 58us)