Quote Originally Posted by actionplus
I have a question on configuring the ports on this PIC. Well, mainly just a port, which is PORTB.5. I would like to use this port as analog input.

I delcared

TRISB = %00000100

and then tried to compile with the Pic Basic Pro but keep getting error with a ADCON0.

Can someone help me with this?

Thanks
1. Your Declaration for TRISB shows PortB.2 as an input

2. The only analogue feature on a 628 is the analogue comparators on PortA

Suggest you study the datasheet a bit further.