From c2e7492fb0f9dd1b82b58e16889e3ba49aa0c693 Mon Sep 17 00:00:00 2001 From: ian Date: Mon, 1 Aug 2005 23:18:04 +0000 Subject: [PATCH] enable booster. fix bug introduced in r1.25 --- cebpic/nmra-stream.asm | 9 +++++++-- detpic/nmra-stream.asm | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/cebpic/nmra-stream.asm b/cebpic/nmra-stream.asm index 09976ac..69a4ffd 100644 --- a/cebpic/nmra-stream.asm +++ b/cebpic/nmra-stream.asm @@ -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 diff --git a/detpic/nmra-stream.asm b/detpic/nmra-stream.asm index 09976ac..69a4ffd 100644 --- a/detpic/nmra-stream.asm +++ b/detpic/nmra-stream.asm @@ -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 -- 2.30.2