P_Santos
Joined: 07 Jul 2011 Posts: 114
|
Posted: Tue Nov 13, 2018 5:45 pm Post subject: Xmega ADC on PortA.3 |
|
|
Hello,
Xmega ADC
Chip Atxmega384C3
This compile fine and can read the digital value
Config Adca = Single , Convmode = UnSigned , Resolution = 12bit , Dma = Off , Reference = Intvcc , Event_mode = None , Prescaler = 512 , _
Ch0_gain = 1 , Ch0_inp = Single_ended , Mux0 = &B00000000 'Setup Channel 0 in Single Ended Mode
Do
w = Getadc(adca , 0 , &B00000000) 'ADC A, Channel 0 , MUX = &B00000000 --> PINA.0
Waitms 1000
print #1, "ADC steps = " ; w
Loop
But i need to use the ADC on PortA.6 but if make the config like this, it not compile and show errors, what make i wrong?
Config Adca = Single , Convmode = UnSigned , Resolution = 12bit , Dma = Off , Reference = Intvcc , Event_mode = None , Prescaler = 512 , _
Ch6_gain = 1 , Ch6_inp = Single_ended , Mux6 = &B01000000 'Setup Channel 6 in Single Ended Mode
Appreciate any help
Regards
P_Santos
(BASCOM-AVR version : 2.0.8.1 ) |
|