Are there any resources or open source projects that use the Arduino Due Atmel SAM3X8E ARM Cortex-M3 CPU’s ADC with an interrupt routine to read a photodiode array IC, or any kind of external IC with a PWM output array?
Specifically, I am using the TSL201R-LF linear sensor array, which requires three things:
- An input clock between 5 - 5000 kHz always running
- A serial input that pulses once at the clock rate to start/stop data transfer from the IC (64 bits) to the receiver
- An analog input pin on the receiver, where the TSL201R-LF sends 64 clock pulses of data
For the Arduino UNO Atmega, there exists a project doing exactly this , and even a library, however the architecture is very different between the two CPUs, and code that depends on the AVR library does not compile with LibSAM.
I have tried hardcoding a software clock with the Due with delays as previously done here and here, however the sensor outputs either a maximum 1023 value or nonsensical numbers: testing the voltage on the output pin does not produce the required 2-3.4V as specified in the data sheet. Furthermore, using the ADC with an interrupt routine would allow for multiple TSL201R-LF’s to be used with a single Arduino Due.
This short tutorial uses a ADC with DMA for temporary data storage, but I could not configure the correct trigger input pulse for the serial input pin. To reiterate: are there any existing projects or code snippets that use the Arduino Due ADC with interrupts and DMA for storage of PWM data arrays?