debug 'f'
- ifbit1 SSPCON2,ACKSTAT ; check for ack from slave (=0), if no
+ ifbit0 SSPCON2,ACKSTAT ; check for ack from slave (=0), if no
+ bra serial_rx_isr_ifnot_noack1
panic morse_SA ; then panic, else
+serial_rx_isr_ifnot_noack1
debug 'g'
movff RCREG,SSPBUF ; copy byte from serial to i2c buffer
call wait_for_i2c_interrupt
- btfsc SSPCON2,ACKSTAT,0 ; check for ack from slave (=0), if no
+
+ ifbit0 SSPCON2,ACKSTAT ; check for ack from slave (=0), if no
+ bra serial_rx_isr_ifnot_noack2
panic morse_SD ; then panic, else
+serial_rx_isr_ifnot_noack2
+
bsf SSPCON2,PEN,0 ; i2c STOP
call wait_for_i2c_interrupt