Mosaic
Well-Known Member
Hello All:
After 6 hours I am stumped....I can't get PORTB to behave normally. I have whittlerd down my prg to bare basics and still can't solve it.
Here is the code, nothing else is happening.
The circuit is attached, although I don't see any interaction to cause this. I have changed the MCU already, both behave the same and both are new.
Thanks for any thoughts.
After 6 hours I am stumped....I can't get PORTB to behave normally. I have whittlerd down my prg to bare basics and still can't solve it.
Here is the code, nothing else is happening.
Code:
banksel ANSEL
clrf ANSELH
clrf ANSEL
banksel TRISA
clrf TRISB
clrf TRISA
bsf TRISB,4
test;
clrf STATUS
clrf PORTB
bsf PORTB,5; no go, port b5 remains low, seems to behave like an input , scoping the pin picks up noise if nearby pins switch.
movlw b'00100000'
movwf PORTB ;no go either ,but triggering PORTB5, B3 and B2 (b'00101100') will allow B5 to set. WHY????!!
goto $
The circuit is attached, although I don't see any interaction to cause this. I have changed the MCU already, both behave the same and both are new.
Thanks for any thoughts.