Just when I though I had this new struct thing down I get stick on this:
I'm trying to config my ADC channel on my xmega 256A3 but cant seem to figure it out.
I got the other registers figured out, just not the config ones. Ive been looking over iox256a3.h for a bit now and am seeing things I never have before, which I obviously don't understand.
void adc_setup(){ ADCA.CTRLA |= ADC_ENABLE_bm; //enable ADC A ADCA.CTRLB |= ADC_FREERUN_bm | ADC_RESOLUTION1_bm; //turn on free running mode, results in 8 bits right justified //ADCA.CH_CTRLA |= ADC_CH_INPUTMODE_SINGLEENDED_gc; //WRONG //ADCA.ADC_CH0.CTRL = 1; //WRONG again! }
Just looking for a little bump in the right direction! Trying to config a channel for ADC_CH_INPUTMODE_SINGLEENDED_gc mode
I appreciate it!