Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Xmega ADC on PortA.3

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
P_Santos

Bascom Member



Joined: 07 Jul 2011
Posts: 61

PostPosted: Tue Nov 13, 2018 5:45 pm    Post subject: Xmega ADC on PortA.3 Reply with quote

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 )
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum