PDA

View Full Version : 16F818 ADCON question



peterdeco1
- 1st February 2006, 10:08
I always put ADCON1 = 7 when compiling the 16F818 to make the analog channels digital. However, it looks to me that ADCON0 = 0 should do the same thing. Can I substitute ADCON1 = 7 with ADCON0 = 0 to make all analog inputs digital or am I missing something? It compiles without errors and "seems" to work but, you know PIC's, a simple oversight can haunt you later. Thank you.

peterdeco1
- 1st February 2006, 10:50
Sorry to bother Everybody. ADCON0 controls the AD module. ADCON1 configures the port pins. No you can't substitue ADCON1 = 7 with ADCON0 = 0.