0x06 is what I have, but as B'00000110'. But you've sorta hit on a point of confusion I had with the table explaining the ADCON1 register (REGISTER 10-2, PAGE 82 of the datasheet). What does the columns "Vref+" and "Vref-" mean in that table? For PCFG3:PCFG0 = '011x' (all digital), the table entries for Vref+ and Vref- are "Vdd" and "Vss". So what does that mean that I need to do? Thanks. ----- Original Message ----- From: "Martin Buehler" To: Sent: Thursday, February 28, 2002 1:36 AM Subject: [PIC]: Experimenting with F872 -- can't read from PORTA ??? > you have to disable the a/d converters, sharing the pins of port a. they > are enabled by default. so port a works well as digital output, but you > will always read a 0, until you disable the a/d's (took me about 2 days of > debugging a driver, that worked well on a 16f84 before...) > tino > > ADCON1 = 0x06; file://set 16f872 port a to digital > > > > > > Quentin > Gesendet von: pic microcontroller discussion list > 28.02.02 08:23 > Bitte antworten an pic microcontroller discussion list > > > An: PICLIST@MITVMA.MIT.EDU > Kopie: > Thema: Re: [PIC]: Experimenting with F872 -- can't read from PORTA ??? > > > Pic Dude wrote: > > > > What am I doing wrong here? I tried to configure port A as all digital > > inputs, but can't read from it. If I replace port A with port C, it > works. > > Here's the init/main part of my code... > The dreaded old bank select problem. Read piclist.com and the data > sheets about register banks and bank switching. > > Quentin > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > > > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.