DEFINE ADC_CLOCK 4 ' i know 3 means internal RC, but i want to use the external resonator, is that 4?
you can't use directly the full speed of external clock. in fact you'll have the external clock divided by n. Refer to section 10 of your datasheet in the ADCON0 table.
DEFINE OSC 20 ' i know 20 means 20mhz, but does that also work for resonators as well as oscillators?
20 is the speed of the external oscillator, can be crystal, ceramic resonator, pins on a motor....
DEFINE SAMPLEUS 50 'i eventually want to sample in the megahertz range if possible,
I'm also going to eventually put in a trigger to start the A/D process and end it after a certain number of samples. Well, off I go into the pic basic manual. Thanks again for the help.
The fastest way is to don't use this ADCIN statement and do your sample with FOSC/2 and read/write the internal registers yourself.
Download and look this code
with some few modification you'll do it as fast as the PIC can do for you 
Last edited by mister_e; - 18th February 2005 at 21:42.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks