pic 16f877a

Thread Starter

polinde

Joined Sep 2, 2008
3
i use pic16f877a
i want the itilization to turn off the analog i/p
in port A pin 5 not work as o/p digital
but i sure that dosent burned
 

boff1

Joined Oct 15, 2008
26
http://ww1.microchip.com/downloads/en/DeviceDoc/39582b.pdf
You need to set register ADCON1 to 0b_0000_011x for all the port A pins to be digital. then TRISA = 0 will set them to be outputs.
Have a look at the datasheet for other settings. You don't have the option of setting A3 to digital and the rest of PORTA to analogue.
I have tested the above with a 16f877; I do not have the "A" version.

I use JAL for most of my programming.
 
Top