Hi,
That's simply not what DEFINE ADC_SAMPLUS does and it's not how PBP in general works.
The ADC does not run continuously in the background (well, it CAN on some devices but for those ADCIN doesn't work anyway).
If you want a reading every second you need to execute the ADCIN command once per second. There are of course many different ways of getting that done depending on your particular needs. The easiest way might be to simply have a counter that keeps track of how many times you've sampled the "fast" channel. If that's 1000 times per second then count to 1000 before sampling the "slow" channels. Another approach is a timer interrupt or using a timer/CCP module and a special events trigger. Since you're still new to this I recommend the simple approach to begin with.
DEFINE ADC_SAMPLEUS tells the compiler how long a delay it needs to insert between selecting the channel to sample and actually starting the conversion. During this time nothing else gets done. If you set it to 1 second the program will stop for a second while the the S/H capacitor charges - it's not what you want.
/Henrik.
Bookmarks