An autodetection mode determines a size, number of modules, and bright-on-dark or dark-on-bright code types and adjusts the reader engine accordingly. The software can read the codes as fast as 40 codes/sec when running on the latest DSP processors. Accuracy is good even when code is damaged, distorted, or poorly printed.