Detect missing pulses to avoid losing data
An external interrupt input catches the missing pulse.
Chien-Hung Chen and Tai-Shan Liao, National Applied Research Laboratories, Hsinchu, Taiwan; Edited by Martin Rowe and Fran Granville -- EDN, June 10, 2010
|
View as PDF |
In an SWIR (short-wave-infrared) indium-gallium-arsenide-based imaging system, the system must detect every trigger pulse; otherwise, lost data will result. This Design Idea solves the problem of a data-conversion system that does not enable an acquisition in the first of 256 trigger pulses. Figure 1 shows the SWIR sensor, IC1. The AD-Trig signal, Pin 24, produces one pulse for each of 256 pixels. Figure 2 shows the AD-Trig pulses, Channel 1 (Trace 1) and Channel 2 (Trace 2), as the two pulse trains. Channel 3 (Trace 3) is the electro-exposure time signal. The signal is active-high when you expose the image sensor to light. The signal goes low before the AD-Trig signals begin.
Oscilloscope Channel 4 (Trace 4) from the microcontroller's I/O pin goes high during the second pulse, but it should go high during the first pulse. Thus, the microcontroller missed the first pulse and the first pixel of the sensor image. A hardware and firmware redesign solves the problem. The AD-Trig signals connect to a microcontroller's PA0 pin, which you can use as an external interrupt input. Figure 3 shows the program flow, and Listing 1 shows the source code.
In Figure 3, the left side is the TD-poll routine in the listing. It uses an I/O pin to detect the electro-exposure signal. When the electro-exposure time signal finishes, the firmware enters the external interrupt subprogram when you activate the AD-Trig signal. The interrupt subprogram reads all of 256 pixels data. The pixel data is no longer lost because the time for firmware processing of the TD poll differs from that of the external interrupt subroutines, and the external interrupt has a higher priority than does the TD poll.





















