Q: Why didn’t you use an arduino to drive the TCD1304?

A: Arduinos are great, but except for the Due, they don’t have DMA, and that makes a world of difference with time-critical stuff.

Q: What’s the difference between the SPI and the UART firmware?

A: A nucleo running the UART-fw can be connected to any computer through the nucleo board’s USB connection. The data-rate is 115.2 kbps so transmission a full dataset takes 640 ms to complete.

A nucleo running the SPI-fw requires a Raspberry Pi. The nucleo and the rpi must be connected through SPI. The data-rate is 16 Mbps so transmission of a full dataset takes 4 ms.

Needless to say, the firmware and the software interface must use the same communication protocol.

Q: I have an STM32Fxxx, will the firmware run directly on it?

A: Probably not. You need to port the code to make sure the timers are prescaled correctly and can be tied to the GPIOs you want to use. The DMA-channels and streams are probably also different. Confer with the datasheet for your MCU.

Q: I have an STM32Fxxx, can the firmware be ported to it?

A: It’s a good question. The firmware relies on the following peripherals:

  • 4 timers (3 for the driving pulses, 1 for triggering the ADC)
  • 1 ADC (with a conversion time < 2µs)
  • DMA-controller (1 stream for the ADC, and 1 for UART/SPI)

Q: Is it possible to drive other CCDs with the firmware?

A: No. Different CCDs have different driving pulses and timing requirements. You’ll need to tailor the firmware to your CCD.

There is one exception: The TCD1305P / TCD1305DG is compatible with the firmware. However, it’s an inferior chip compared to the TCD1304, and it’s more expensive.