I am new to using the PIC Mid-Range MCU's and I am struggling with them.

I can't seem to get the PIC16F870 to change it's pins to digital. I am only familar with PICBasic Pro.

Anyhow, from the datasheet and the reference manual for mid-range pic's, it seems that it uses ADCON0 and ADCON1. I have set these bits and my Tris bits. Still doesn't Fing work.

I have Porta.0, Porta.1, Portb.4, and Portb.5 as digital inputs (for a button press) and all the rest just need to be digital outputs so they can go high or low to switch some NPN transistors on and off.

Any help on how the hell to get this to function at all would be very appreciated.