Quantcast
Channel: MEL PICBASIC Forum
Viewing all articles
Browse latest Browse all 4791

18F66K80 adc

$
0
0
OK i'm confused by the 12 bit adc register settings.. I've got the pic adc working but is it optimal?
I'm trying to avoid using defines but am using adcin...

Processor is running at 64mhz

My current ADC config..

ADCON0 = %00000001 'SETUP ADC & ENABLE ADC MODULE on AN0
ADCON1 = %00010000 'SETUP ADC SET REFV to the 2.5V VREF+ & VSS
ADCON2 = %10011110 'SETUP ADC FOSC/64 RIGHT JUSTIFY TAD 6 (12 Bit)

My input has a 4.7k series resistor and 0.1uf cap (Higher impedance than spec but should work with a suitable TAD)

So with fosc 64 have I got TAD correct? What do you make it?
Maths isn't my strong point so the example calculations in the datasheet are :confused:

18F66K80 Datasheet link for info..

http://ww1.microchip.com/downloads/e...doc/39977c.pdf

There is also some info in the Errata datasheet for the part concerning the 12bit adc.

How will that effect me? Comments welcome?

http://ww1.microchip.com/downloads/e...-80000519P.pdf

Viewing all articles
Browse latest Browse all 4791

Trending Articles