Hi all,
thanks for your help everyone. It ended up being the setting of ANSEL and ANSELH. I added the ANSEL line and portb.0 started working. So I tried to alternate all portb pins between low and high in same block of code. Then the portb.0 through portb.5 pins didn't work but portb6 and 7 did. So I added ANSELH=0 and then they all started working.
I have learnt something. Read and understand the datasheet. This is my first experience of translating the datasheet into programming registers and now I know how important it is. It's not a PICAXE!!
So if DEFINE OSC 8 doesn't change internal osc freq, what does I wonder. I am of course, not using an external osc and the chip supports 8mhz. I will read datasheet and see if I can work it out but if I haven't posted back here by the time someone sees this, please enlighten me!
Thanks again guys
Rich




Bookmarks