I know this seems really trivial, but I am using an 18F2620 and I set portb.0 high in the beginning of the program with no problems. Later I try to set it low, and it won't go low. The program is quite large, and I can't figure out what could possibly prevent setting the pin low. I have one of my programs from a week earlier, before adding a bunch of stuff, and it works fine proving it is not hardware related.
I am turning off the AD and comparators for that pin with
ADCON1 = (%)00001010 (without the brackets)
CMCON = 7
TRISB.0=0 'set to output
PORTB.0=1 'sets the pin high, which works fine
I have tried:
LOW portb.0
PORTB.0=0
putting a pause before and after setting it low.
Nothing works. I am sure it is something stupid in my code, but maybe if you can bounce some ideas I will be able to find it. I am using the CCP1 module for measuring pulses on portc.2, as I was on the older program that works fine.
Bookmarks