> -----Original Message-----
> From: Roman Black [SMTP:
.....fastvidKILLspam
@spam@EZY.NET.AU]
> Sent: Tuesday, April 24, 2001 8:41 AM
> To:
PICLIST
KILLspamMITVMA.MIT.EDU
> Subject: Re: [PIC]: 16F877 ADC Probs (What will it measure)
>
> Graham North wrote:
> >
> > Sorry, can someone answer my other question?
> >
> > >Hi I'm having some problems with the ADC on the 16F877. Am I correct in
> > >thinking that I can connect the sampling pin straight to a voltage (is
> this
> > >limited to 0 -> 5 Volts). Is some sort of protection recomended.
>
>
> Hi Graham, first, your code sample showed you
> were setting ADCON1 to "all pins digital", this
> is a good possibility why your ADC is not working.
>
> Re the ADC input pin, I suggest using the largest
> resistor you can, this gives greater safety to the
> PIC and reduces strain on it's protect diodes if
> you mess up. With a signal that changes very fast,
> you will need to keep the series resistor smaller
> to reduce RC effects on the input pin, but 1k
> should be fine for most things. For most slowly
> changing analogue signals I use a 10k resistor.
>
> If you need to measure a higher voltage, like a
> 12v battery for instance, just use two resistors
> in a voltage divider. say a 4.7k and 2.2k gives
> about 3:1 and will give you 0v to 15v measuring.
> :o)
> -Roman
>