A method of counting pulses representing an analog signal in at least one unit cell in a plurality of unit cells, the at least one unit cell comprising a first counter, a second counter, and a converter operably coupled to the first counter, the second counter, and a photodetector array, the method comprising:
- producing a photocurrent, with at least one photodetector in the photodetector array, in response to detection of light;
- converting the photocurrent, with the converter, into a series of pulses;
- counting, with the first counter, first pulses in the series of pulses according to a first operating mode set by a first control signal;
- and
- counting, with the second counter, second pulses in the series of pulses according to a second operating mode set by a second control signal that is different from the first control signal.