Holbæk
Offline
Newbie
Karma: 0
Posts: 10
Arduino rocks
|
 |
« on: November 21, 2012, 10:18:17 am » |
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
Brattain Member
Karma: 299
Posts: 26024
Solder is electric glue
|
 |
« Reply #1 on: November 21, 2012, 10:27:40 am » |
You sure about that? Are you mixing them up with analogue inputs? They are not the same thing.
|
|
|
|
|
Logged
|
|
|
|
|
Holbæk
Offline
Newbie
Karma: 0
Posts: 10
Arduino rocks
|
 |
« Reply #2 on: November 21, 2012, 11:55:58 am » |
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
Brattain Member
Karma: 299
Posts: 26024
Solder is electric glue
|
 |
« Reply #3 on: November 21, 2012, 01:53:44 pm » |
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
Newbie
Karma: 0
Posts: 10
Arduino rocks
|
 |
« Reply #4 on: November 21, 2012, 03:57:07 pm » |
... 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
Brattain Member
Karma: 269
Posts: 17035
Available for Design & Build services
|
 |
« Reply #5 on: November 21, 2012, 03:58:53 pm » |
analogRead(0-15) - the names on the board are just that - names.
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 299
Posts: 26024
Solder is electric glue
|
 |
« Reply #6 on: November 21, 2012, 04:14:59 pm » |
can I just use analogRead(0-15)? Probably not. 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
Newbie
Karma: 0
Posts: 10
Arduino rocks
|
 |
« Reply #7 on: November 21, 2012, 05:08:22 pm » |
... 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
Brattain Member
Karma: 299
Posts: 26024
Solder is electric glue
|
 |
« Reply #8 on: November 21, 2012, 05:19:20 pm » |
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
Brattain Member
Karma: 269
Posts: 17035
Available for Design & Build services
|
 |
« Reply #9 on: November 21, 2012, 06:33:45 pm » |
Sorry, my reply was incorrect - I didn't realize this was for the Due chip, I had '2560 on the brain.
|
|
|
|
|
Logged
|
|
|
|
|
Holbæk
Offline
Newbie
Karma: 0
Posts: 10
Arduino rocks
|
 |
« Reply #10 on: November 21, 2012, 07:55:56 pm » |
So if I don't want to modify the IDE and the bord, I only have 10 analog inputs?
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 299
Posts: 26024
Solder is electric glue
|
 |
« Reply #11 on: November 22, 2012, 01:21:46 am » |
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
Newbie
Karma: 0
Posts: 10
Arduino rocks
|
 |
« Reply #12 on: November 22, 2012, 09:04:43 am » |
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
Brattain Member
Karma: 299
Posts: 26024
Solder is electric glue
|
 |
« Reply #13 on: November 22, 2012, 10:11:03 am » |
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
Newbie
Karma: 0
Posts: 10
Arduino rocks
|
 |
« Reply #14 on: November 22, 2012, 10:25:49 am » |
Damn... I need new glasses 
|
|
|
|
|
Logged
|
|
|
|
|
|