PIC microcontroller 16f877A PORTA as a output?

Discussion in 'Embedded Systems and Microcontrollers' started by cpleng7, Jan 19, 2011.

  1. cpleng7

    Thread Starter Active Member

    Dec 18, 2008
    120
    0
    why i have set portA as a output it cannot work? is that i still need to configure somethings?
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Yes indeed:D Read section 4 in the data sheet found here. http://ww1.microchip.com/downloads/en/devicedoc/39582b.pdf Even if you program in C you have to set some other registers as shown in example 4-1, in the same data sheet
     
  3. cpleng7

    Thread Starter Active Member

    Dec 18, 2008
    120
    0
    I have set all the port A as a digital
    i put ADCON1 = 0X06;

    the result is the not function as smooth as the portb as output. is that any configuration that miss writing in the datasheet?
     
  4. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Post your code Then we may see how to help you.
     
Loading...