Go Down

Topic: analog inputs (Read 3542 times) previous topic - next topic

sandsound

Nov 21, 2012, 04:18 pm Last Edit: Nov 21, 2012, 07:43 pm by sandsound Reason: 1
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

Grumpy_Mike

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

sandsound


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.

Grumpy_Mike

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.

sandsound


... 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)?

CrossRoads

analogRead(0-15) - the names on the board are just that - names.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Grumpy_Mike

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.

sandsound


... 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?

Grumpy_Mike

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.

CrossRoads

Sorry, my reply was incorrect - I didn't realize this was for the Due chip, I had '2560 on the brain.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

sandsound

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

Grumpy_Mike


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?

sandsound

#12
Nov 22, 2012, 03:04 pm Last Edit: Nov 22, 2012, 03:20 pm by sandsound Reason: 1


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.

Grumpy_Mike

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.

sandsound

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

Go Up