Patent ID: 6995756

Claim:
An apparatus comprising: a first pixel; a second pixel; a counter; a first driver coupled to the counter and to the first pixel, and configured to drive the first pixel in accordance with a first pulse width that corresponds to a value stored in the counter, the first driver including a first comparator coupled to the counter and configured to compare a current counter value with zero; a register; a second driver coupled to the counter, to the register, and to the second pixel and configured to drive the second pixel in accordance with a second pulse width that is determined based on (a) the value stored in the counter, and (b) a value stored in the register, the second driver including a second comparator coupled to the counter and the register, the second comparator being configured to compare the current counter value with the value stored in the register; a storage device which stores a first pixel value and a second pixel value; and a control circuit coupled to the storage device, to the counter, and to the register; the control circuit being configured to: initialize the counter to the first pixel value; calculate a difference between the first pixel value and the second pixel value; and store a value corresponding to the calculated difference in the register.