analog inputs

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

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

Grumpy_Mike: 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.

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.

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

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

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.

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

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.

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

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

sandsound: 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?

Grumpy_Mike:

sandsound: 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.

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.

Damn... I need new glasses :blush:

Grumpy_Mike:

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.

In some way both wrong, there a 14 analog pins the last 2 are on TWI0 but they have Pull-ups

In some way both wrong,

No I said:-

The board has analogue inputs labeled A0 to A11 that's twelve inputs.

That is in no way incorrect. The fact that the board has a few more analogue inputs dedicated to an other function was mentioned further back in the thread.

In fact you are wrong saying:-

there a 14 analog pins

There are in fact 15 analogue pins, the 16th input to the multiplexer is the internal temperature monitor. But only 12 are supported in the software as used by the digitalRead(pin) function.

Grumpy_Mike:

In some way both wrong,

No I said:-

The board has analogue inputs labeled A0 to A11 that’s twelve inputs.

That is in no way incorrect.
The fact that the board has a few more analogue inputs dedicated to an other function was mentioned further back in the thread.

In fact you are wrong saying:-

there a 14 analog pins

There are in fact 15 analogue pins, the 16th input to the multiplexer is the internal temperature monitor.
But only 12 are supported in the software as used by the digitalRead(pin) function.

Yes Mike, you are right I’am wrong, my fault. I missed ADC14 on Pin52, and yes my wrong 12 supported by the corefiles from the IDE. Sorry.