What PIC MCU are you using?
Should you be using LATB register instead of PORTB register for your High and Low statements?
Read modify write may be an issue.
What PIC MCU are you using?
Should you be using LATB register instead of PORTB register for your High and Low statements?
Read modify write may be an issue.
Regards,
TABSoft
I am using an 18f2550.....
Norm...I don't think I am experienced enough to use that debug code...
I have looked back at some other code I have written and have used while/wend the same way.. should I use a pullup on portb.5 to ensure it is high?...I will try that but I think I have already..
Thanks for helping me figure this out...
I guess that was it...the pullup resistor on the input...apparently it was floating...
Hi
Portb on the 18f2550 has analog inputs. You need to set the those pins to digital.
Try adding
ADCON1 = %00111111
This will make all the analog pins digital, see page 254 data sheet
Last edited by mark_s; - 26th July 2015 at 01:07.
Bookmarks