The TCD1304 Linear CCD

This site contains information about driving the TCD1304 linear CCD with an STM32 microcontroller (STM32F401, STM32F405 and STM32F103).

The firmware(s) allow for integration time of anywhere between 10 µs and 35 min, in steps of 0.5 µs.¹ The frame rate can be up to 125 Hz. ADC-resolution is 12-bit.

MCU UART SPI USB ADC tint max CCD clock 3 max fps 4
STM32F401 (x) 1 (x) 1 12-bit 35 min 2,0 MHz 1,5 Hz
STM32F401 x 12-bit 18 min 4,0 MHz 125 Hz
STM32F405 x 12-bit 35 min 2,0 MHz 13,3 Hz 5
STM32F103 x 12-bit 81 ms 2 800 kHz 9,5 Hz 5
1 The UART-connection is through a built-in USB->UART.
2 The STM32F103 lacks 32-bit timers, and supports only a limited interval of integration times.
3 Default values for the precompiled firmwares. Each MCU can deliver clocks in the range 0,8-4,0 MHz.
4 The values depend on both the communication protocol and the CCD clock.
5 FS-USB is 12 Mb/s, but around 500 kb/s is more likely.

The MCU can either be interfaced through SPI, UART or USB. In the first case the presented software must run on a Raspberry pi or similar. In the latter, the MCU may be connected directly to a PC running linux, macOS or Windows.


The graphical user interface for the TCD1304.

The information on this site was originally presented in my projects on hackaday and/or my original blog. The OtterVIS spectrophotometer as well as Glowstick Kinetics are simple spin-off projects to demonstrate the use of the CCD.

¹The maximum integration time can be up to 70 min depending on the frequency of the master clock, which may be changed only at compile time.