Drive CCD Sensor : TCD1304DG
Hi ST Community,
I discovered nucleo board 2 weeks ago because I want build spectrometer using a Toshiba TCD1304DG CCD sensor.
I’m reaching out because I need your help understanding how to drive this ccd sensor.
I’ve read datasheet and projects on internet to get a general understanding of how to operate this sensor. However, there are a few points I’m still unsure about. Could you please help me clarify the following questions?
Here is the datasheet : https://toshiba.semicon-storage.com/info/TCD1304DG_Web_Datasheet_en_20260520.pdf?did=13709&prodName=TCD1304DG
1. Is my understanding of the acquisition sequence correct?
My understanding is that, to read all 3,694 pixels using a hardware timer, the ADC, and DMA, the acquisition sequence should be as follows:
- Set ICG LOW.
- After 500 ns, set SH HIGH.
- After 5,000 ns, set SH LOW.
- After another 5,000 ns, set ICG HIGH.
- Read all 3,694 pixels from the OS pin. The master clock (M) runs continuously, shifting the pixel values out sequentially, while the ADC samples the OS signal at the appropriate times. (that step take few milliseconds)
- Send data
- Repeat the sequence to acquire the next CCD line.
This is my interpretation of the datasheet. However, there is something I miss because :
I’m using an STM32 Nucleo-G474RE board and a circuit assembled on a breadboard. With my current setup, I can see the ADC readings change as the ambient light level changes. However, I cannot obtain meaningful pixel-by-pixel measurements :
For example, if I cover part of the CCD, I would expect the corresponding pixels to show different ADC values. Instead, I don’t see the expected variation across the pixel array.
This makes me think that I’m missing something. To determine if I have to work on hardware or software, I prefer check by you I we understand datasheet the same way.
2. Synchronizing the ADC with the master clock (M)
My understanding is that the pixel values are output sequentially on the OS pin. To measure each pixel, the ADC must be synchronized with the master clock (M).
However, in some projects I found online, one pulse of the master clock (M) seems to push one pixel to pin OS, whereas in other projects, one pixel is pushed to pin OS every four clock pulses.
I’m therefore unsure whether I should trigger the ADC once per M clock pulse or once every four M clock pulses to correctly measure each pixel.
Could someone clarify how this works?
I don’t want to overload this post with too much information, but I’d be happy to share my code and circuit diagram if that would help.
Thank you for your assistance.
Martin
