A printer has a print path, a code strip disposed in parallel along the
print path, a sensor for sensing the code strip, a driving system for
moving the sensor along the code strip, a timer, a memory and a position
signal generator. The code strip has embedded position information, which
the sensor reads. The sensor generates a first or a second code signal
depending upon the position of the sensor on the code strip. The timer
generates clock signals at a rate that corresponds to an expected rate of
change of the first and second signals from the sensor when the driving
system moves the sensor along the code strip. The memory is used to hold
the locations of defective areas on the code strip. The position signal
generator uses the sensor to generate a position signal when the sensor is
not reading within any of the defective areas on the code strip, and uses
the clock signals from the timer to generate the position signal when the
sensor is moving within any of the defective areas on the code strip.