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
;----------------------------------------------------------------------------
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
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
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
;----------------------------------------------------------------------------
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
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