chiark / gitweb /
testing changes (timer scalings/value written in after interrupt)
authorceb <ceb>
Tue, 4 Jan 2005 22:34:05 +0000 (22:34 +0000)
committerceb <ceb>
Tue, 4 Jan 2005 22:34:05 +0000 (22:34 +0000)
cebpic/nmra-stream.asm
detpic/nmra-stream.asm

index 71749f30e8d7133b65f84a1598be9dfb92f32354..4e0175a13700344a97e2a30936e8ba230ee74929 100644 (file)
@@ -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)
 
 
index 71749f30e8d7133b65f84a1598be9dfb92f32354..4e0175a13700344a97e2a30936e8ba230ee74929 100644 (file)
@@ -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)