astuder / epc901

Experiments with ESPROS epc901 1024x1 CCD line sensor, including a spectroscope.
Other
51 stars 8 forks source link

First frame after MCU reset is dark #2

Closed astuder closed 3 years ago

astuder commented 3 years ago

All pixels in the first frame after an MCU reset are dark (value ~320). To reproduce, reset MCU with reset button or shell command. Then use snap.py to take single frames.

The noisy data seems to indicate that this is real data read from the sensor and not an issue with the frame buffer of the Camera class.

I suspected the dummy SHUTTER pulse in EPC901::init() to be the problem. But a soft-reset of the sensor after the pulse does not solve the issue.

astuder commented 3 years ago

Issue is related to the setup of the SHUTTER pulse length, i.e. timer configuration. Changing the exposure time is only applied with 1 frame delay.

astuder commented 3 years ago

Timer required UG event to update internal state with newly configured values. Also removes the need for the dummy pulse in EPC901::init()