chiark / gitweb /
enable booster. fix bug introduced in r1.25
authorian <ian>
Mon, 1 Aug 2005 23:18:04 +0000 (23:18 +0000)
committerian <ian>
Mon, 1 Aug 2005 23:18:04 +0000 (23:18 +0000)
cebpic/nmra-stream.asm
detpic/nmra-stream.asm

index 09976ac422dbfb32d296ef75f34e74cd923c7283..69a4ffd70ddbce757d78478eb3964d20a9fc9674 100644 (file)
@@ -170,9 +170,13 @@ initialise
        bcf     PORTC,0,0       ; set low initially
 
 ; set booster pwm high
-       bcf     TRISC,1,0       ; make pin 1 (booster pwm) output
        bsf     PORTC,1,0       ; booster pwm high
+       bcf     TRISC,1,0       ; make pin 1 (booster pwm) output
+
+       bcf     PORTB,2,0       ; booster shutdown L
+       bcf     TRISB,2,0       ; booster shutdown not-Z
 
+       bcf     PORTB,0,0       ; user fault L or Z
 
        debug   'd'     ; write 'd' to serial port
 ;----------------------------------------------------------------------------
@@ -236,7 +240,6 @@ serial_receive
        btfsc   RCSTA,OERR,0            ; if OERR set (= overrun error), then panic
        goto    panic
 
-       btfsc   RCSTA,OERR,0            ; OERR set = overrun error; panic
        movff   FROMSERIAL,FSR0L        ; set low byte of INDF0 pointer
        movlw   BUFFERPAGE
        movwf   FSR0H,0                 ; set high byte of INDF0 pointer
@@ -343,10 +346,12 @@ decide_next_bit
        bsf     NMRACTRL,TRANSMITBIT,0
        bsf     NMRACTRL,NEXTACTION,0
        debug   '3'
+       bsf     TRISB,0,0       ; user fault Z (red)
        retfie  1
 
 
 read_from_buffer
+       bcf     TRISB,0,0       ; user fault L (purple)
        debug   'o'
 
 ; if currently on bit 7, want to skip to bit 6
index 09976ac422dbfb32d296ef75f34e74cd923c7283..69a4ffd70ddbce757d78478eb3964d20a9fc9674 100644 (file)
@@ -170,9 +170,13 @@ initialise
        bcf     PORTC,0,0       ; set low initially
 
 ; set booster pwm high
-       bcf     TRISC,1,0       ; make pin 1 (booster pwm) output
        bsf     PORTC,1,0       ; booster pwm high
+       bcf     TRISC,1,0       ; make pin 1 (booster pwm) output
+
+       bcf     PORTB,2,0       ; booster shutdown L
+       bcf     TRISB,2,0       ; booster shutdown not-Z
 
+       bcf     PORTB,0,0       ; user fault L or Z
 
        debug   'd'     ; write 'd' to serial port
 ;----------------------------------------------------------------------------
@@ -236,7 +240,6 @@ serial_receive
        btfsc   RCSTA,OERR,0            ; if OERR set (= overrun error), then panic
        goto    panic
 
-       btfsc   RCSTA,OERR,0            ; OERR set = overrun error; panic
        movff   FROMSERIAL,FSR0L        ; set low byte of INDF0 pointer
        movlw   BUFFERPAGE
        movwf   FSR0H,0                 ; set high byte of INDF0 pointer
@@ -343,10 +346,12 @@ decide_next_bit
        bsf     NMRACTRL,TRANSMITBIT,0
        bsf     NMRACTRL,NEXTACTION,0
        debug   '3'
+       bsf     TRISB,0,0       ; user fault Z (red)
        retfie  1
 
 
 read_from_buffer
+       bcf     TRISB,0,0       ; user fault L (purple)
        debug   'o'
 
 ; if currently on bit 7, want to skip to bit 6