You know if it is possible to use the ADC-bean to measure Once Parallell simultaneous on two channels, let's say channel 2 anc 5 (on separate S/H-circuits ), and during the program runs, I want to change which cannels, to for say 3 and 6. Is there a method, or an easy way to do this using Processor Expert ? I know it's possible if i didn't have to change which cannel is measured, but it's crucial that I may change it at an arbitary time.
Hope you have any ideas!
unfortunately, the ADC bean does not support switching channels for simultaneous measurement, however, as it has been suggested in previous posts, you can switch by directly writing to ADC registers before each measurement. But please note that this is possible only if you have disabled individual channel accessing method like MeasureChan.
For example, to switch to channels 3 and 6:
/* ADLST1: ??=0,SAMPLE3=0,??=0,SAMPLE2=0,??=0,SAMPLE1=0,??=0,SAMPLE0=3 */
setReg16(ADLST1,0x03); /* Set ADC channel list reg. */
/* ADLST2: ??=0,SAMPLE7=0,??=0,SAMPLE6=0,??=0,SAMPLE5=0,??=0,SAMPLE4=6 */
setReg16(ADLST2,0x06); /* Set ADC channel list reg. */
Processor Expert Support Team