Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx

Discussion Groups

Discussion Groups | Piclist | Re: Re: Problem involving configuring pins for analog/digital operation

A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.

Re: Re: Problem involving configuring pins for analog/digital operation - Eirik Karlsen - May 26 14:40:14 2008


Jason,
Sure you're not, the very first time I used the ADC I found that none of the A/D combinations
in ADCON was a perfect fit... No problem, just moved the digital data to available pins on
another port. Adds a tiny bit of software overhead, but we're talking bytes so no problem.
Personally I find switching port or pin mode under program control a slightly 'dirty' practice and
have managed to avoid it completely in the 20 or so programs I've made to date.

Yes 10K should be more than adequate, without knowing the details I'd say 470R would also
the job. Just remember to place a capacitor ( a few nF) from ADC pin to gnd...
the internal ADC sample & hold circuit has limitations on the source impedance,
seem to remember that anything over 2K5 (PIC18) will give a sampeling/measuring error.
See the ADC documentation.

Jason Hsu wrote:

> Thanks. I'll just have the ports reconfigured at the key times. I'm
> surprised that it's rarely done. I can't possibly be the first person
> in the history of the world to find that the available analog/digital
> port configurations are not suitable. I'm not concerned about
> excessive current in any of the pins, because both of my designated
> input pins have 10 kohms between them and their respective voltage
> sources.
>
--
*******************************************
VISIT MY HOME PAGE:

LAST UPDATED: 23/08/2003
*******************************************
Regards
Eirik Karlsen


(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )