1. polinde

    Thread Starter New Member

    Sep 2, 2008
    3
    0
    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
     
  2. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
  3. boff1

    Member

    Oct 15, 2008
    26
    0
    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.
     
Loading...