3

Can someone tell me how fast the built in DAC (and ADC) in an Arduino Due can be written or read? I currently don't have the equipment to measure but need the information to plan my next steps.

I try to move galvanometer mirrors and want to make the voltage/position updates as small as possible. How fast are the internal DACs compared to an SPI connection (where I have to write 2 Byte).

4
  • 1
    You can find all the specs on the cpu datasheet: atmel.com/images/…
    – max246
    Commented Nov 21, 2015 at 17:53
  • Could you give me a hint on where I find this information in that 1500 page document? And how does this chip talk to the arduino?
    – FooTheBar
    Commented Nov 21, 2015 at 17:55
  • I think the galvanometer is orders of magnitude slower than the DAC. It has to overcome it's inertia, and requires quite some time to stabilize.
    – Gerben
    Commented Nov 21, 2015 at 18:11
  • 1
    The hardware can handle position updates in the range of around 30kHz. Before moving to the Due, I used an RPi 2 with an SPI DAC and couldn't reach that update rate. I hope that you are right, but some numbers on the update rate would be great.
    – FooTheBar
    Commented Nov 21, 2015 at 18:17

1 Answer 1

3

See sections 43, Analog-to-Digital Converter (ADC), and 44, Digital-to-Analog Converter Controller (DACC), in the Atmel-11057-32-bit-Cortex-M3-Microcontroller-SAM3X-SAM3A_Datasheet.pdf specsheet.

In particular, subsection 43.2, Embedded Characteristics, says: “1 MHz Conversion Rate”. Some time diagrams appear quite a few pages later that suggest 10-bit conversions can be done more rapidly than 12-bit.

For the DAC (or DACC, per the specsheet), section 44.6, Functional Description, says:

The DACC uses the master clock (MCK) divided by two to perform conversions. This clock is named DACC Clock. Once a conversion starts the DACC takes 25 clock periods to provide the analog result on the selected analog output.

AIUI, the Due's master clock frequency is 84 MHz, so DACC Clock frequency is 42 MHz, whence 25 cycles take 575 ns, which is an update frequency of about 1.74 MHz.

For more details about the ADC, see eg Analog performance, particularly of Due's 12 bit ADC at djerickson.com.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.