An integrated solution
In traditional barcode scanner designs, each system feature requires a collection of discrete components. For example, the barcode sensing subsystem requires a CCD surrounded by supporting passive components, a discrete ADC, and a controlling MCU. The audio subsystem often requires a discrete DAC, a filtering circuit, and a small speaker. The USB subsystem usually requires an external crystal to meet timing requirements imposed by the USB protocol.
Developers who find ways to eliminate some of these components can minimize the total build cost of the board, shrink the minimum board size required for layout, and reduce the system’s average current draw. Additionally, combining more features into fewer components can streamline the development process and speed time-to-market. A highly integrated solution, such as that shown in Figure 1, also improves system reliability because a design with fewer components reduces potential points of failure in the system.
Figure 2: The connections between the ADC and port pins of a 32-bit MCU to a CCD.
On-chip ADC sampling
When choosing a 32-bit MCU with an on-chip ADC, developers must be aware of misleading specifications that can narrowly define ADC performance as an operating region in which the device happens to perform well. For instance, some MCU datasheets won’t provide a specification that spans the MCU’s entire operating temperature and voltage range.
Choosing an MCU whose performance is so narrowly defined leaves a design vulnerable to performance degradation when operating outside the confines of the ADC’s specification. For instance, an MCU’s ADC might begin to see non-monotonic behavior when operating at high temperatures or when operating at the low end of the operating voltage range.
By selecting an MCU that has been exhaustively characterized and whose performance is specified to cover the broadest possible operating range, developers will ensure that their barcode scanner products will function reliably across a wide spectrum of end-customer use cases.
The Silicon Labs Precision32 family offers two on-chip 12-bit ADCs that provide a maximum throughput of 2 Msamples/s with linearity of less than a single code across voltage and temperature operating ranges. The part’s high-precision ADCs deliver design performance equivalent to a discrete ADC while saving BOM cost by integrating that functionality into the MCU. Additionally, an on-chip ADC lets developers take advantage of the MCU’s low-power features by placing the MCU in low-power states during autonomous scanning, and enabling code to easily toggle power to the ADC between scans.
The ADC subsystem provides additional functionality that makes highly integrated mixed-signal MCUs even more compelling for barcode scanning applications. For example, the MCU’s sample sync generator (SSG) can be configured to output a clock source derived from the ADC’s sample clock. The SSG’s clock output can toggle at a rate of 1/16 of the ADC’s clock, enabling the system to output an external clock that’s synchronized to the ADC’s start of conversion. This output clock, when routed to the CCD’s shift register input along with another MCU-provided start-of-conversion signal, effectively synchronizes the ADC’s scan rate to the output rate of the CCD’s pixel information.
The ADC can be configured to autonomously execute multiple captures and store the resulting data in memory using a DMA module. This combination of a fast, accurate ADC that can scan the entire range of the CCD’s pixel resolution autonomously means that the developer’s firmware only needs to initiate the first scan and then wait for the final DMA transfer to complete.