I have a funny problem with driving PortB.6 as a digital io. (18LF 44K22 PBP 2.6c)
The first 3 flashes work fine using HIGH PORTB.6, but doing the same again using PORTB.6 = 1 doesn't work though the other pins work as expected.
I have looked through the data sheet and can find no clues. Can anyone point me in the right direction?
Tim.
Code:TEMPB VAR BYTE 'Temporary Byte sized register STARTUP: ANSELA = 0 'ALL DIGITAL INPUTS ANSELB = 0 ANSELC = 0 ANSELD = 0 ANSELE = 0 TRISA = %11011100 'PortA ins & outs TRISB = %00010000 'PortB ins & outs TRISC = %11011110 'PortC ins & outs TRISD = %10000000 'PortD ins & outs TRISE = %00000100 'PortE ins & outs FOR TEMPB = 1 TO 3 'ALL LED'S FLASH STARTUP SIGNAL PORTB.5 = 1 HIGH PORTB.6 PORTB.7 = 1 PAUSE 200 PORTB.5 = 0 LOW PORTB.6 PORTB.7 = 0 PAUSE 300 NEXT TEMPB FOR TEMPB = 1 TO 3 'ALL LED'S FLASH STARTUP SIGNAL PORTB.5 = 1 PORTB.6 = 1 PORTB.7 = 1 PAUSE 200 PORTB.5 = 0 PORTB.6 = 0 PORTB.7 = 0 PAUSE 300 NEXT TEMPB GOTO MAIN




I just can't remember all the details of how.


Bookmarks