All,

Im programming a PIC16F628 pic.
I have a problem where I need a lot of outputs and I don’t know how to stop some ports from performing there alternate function.

Ports in question are
RA4
RB6
RB7

Although I am specifying

CMCON = 7 ' PortA = digital I/O
VRCON = 0 ' A/D Voltage reference disabled
TRISA=%00000000 ' Or TRISA = 0 sets all the PORTA pins to outputs
TRISB=%01000000

They are still randomly setting the pins to be there other function.

Anyone know the command or how I can just make them OUTPUT pins.

Thanks