Pages: [1] 2   Go Down
Author Topic: analog inputs  (Read 3283 times)
0 Members and 1 Guest are viewing this topic.
Holbæk
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all

The specifications on the SAM3X8E say that the chip have 16 audio analog inputs, is there anyway to access them all on the DUE?

I'm building a midi drumbrain and would like to avoid using multiplexor's.

http://www.sandgreen.dk/index.php/e-drums/arduino-drumtrigger
« Last Edit: November 21, 2012, 01:43:17 pm by sandsound » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34547
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You sure about that?
Are you mixing them up with analogue inputs? They are not the same thing.
Logged

Holbæk
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You sure about that?
Are you mixing them up with analogue inputs? They are not the same thing.

Sorry bout that, I ment to write analog inputs.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34547
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well if you look at the data sheet and the schematic you will see that 4 of the analogue inputs are used for other things:-
PA11 - TXdata2
PB12 SDA0 - 3
PB13 SCL0 - 3
PB21 Rx3
That means they are switched to those alternate functions and they are wired up on the board as if they were those functions. So yes if you want to hack the tracks and initialise those as analogue functions you can do, but you then loose the functionality of what they are assigned to at the moment.
Logged

Holbæk
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

... if you want to hack the tracks and initialise those as analogue functions you can do, but you then loose the functionality of what they are assigned to at the moment.

Thanks :-)
I don't use those inputs, and I might be able to hack the hardware, but I'm not sure what to do with the software?
Will I have to change the source to the IDE or can I just use analogRead(0-15)?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27357
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

analogRead(0-15) - the names on the board are just that - names.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34547
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
can I just use analogRead(0-15)?
Probably not.

Quote
Will I have to change the source to the IDE
Probably.

Or you can directly access the hardware and do all the other stuff associated with a read as well.
Logged

Holbæk
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

... Or you can directly access the hardware and do all the other stuff associated with a read as well.

Sorry if I'm asking dumb questions, but does "directly access" imply flashing the chip without the IDE?
If so... I haven't had much luck with this.

Right now I'm using A0-11 for triggers, but I'm not sure about DAC0-1, can I use them just like the other analog inputs?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34547
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but does "directly access" imply flashing the chip without the IDE?
No.
It means talking directly to the registers on the chip that control the A/D. Just like you do on the Uno when doing things like setting the PWM speed.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27357
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, my reply was incorrect - I didn't realize this was for the Due chip, I had '2560 on the brain.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Holbæk
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So if I don't want to modify the IDE and the bord, I only have 10 analog inputs?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34547
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So if I don't want to modify the IDE and the bord, I only have 10 analog inputs?
It is twelve isn't it?
Logged

Holbæk
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So if I don't want to modify the IDE and the bord, I only have 10 analog inputs?
It is twelve isn't it?

If someone could kindly direct me to where I might find these two extra pins I would be delighted.

I know what the documentation says, but I can't see more than 10 analog inputs on the board.
« Last Edit: November 22, 2012, 09:20:04 am by sandsound » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34547
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but I can't see more than 10 analog inputs on the board.
.?
The board has analogue inputs labeled A0 to A11 that's twelve inputs.
Logged

Holbæk
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Damn... I need new glasses  smiley-red
Logged

Pages: [1] 2   Go Up
Jump to: