Decoding the Dot: A Deep Dive into Barcode Label Printer Electronics - Extended Section 27 |
Subtitle: Internal Memory - NOR Flash for Firmware and Font Storage |
Introductory Summary |
In the previous section, we explored the SDRAM frame buffer - the volatile memory that stores the label image during printing. But SDRAM is volatile - it loses its contents when the power is turned off. The printer needs a non-volatile memory that retains its contents even without power. This non-volatile memory stores the printer's firmware (the program that runs the printer), the font tables (the character shapes for the labels), and the configuration data. The most common non-volatile memory for this purpose is NOR Flash. This chapter is devoted entirely to NOR Flash memory - the storage medium for the printer's firmware and fonts. We will explain what NOR Flash is, why it is used, and how it is connected to the CPU. We will cover the NOR Flash architecture - the cells, the sectors, and the blocks. We will explore the interface - the parallel interface (common in older designs) and the serial interface (SPI or Quad-SPI, common in modern designs). We will look at the read, write, and erase operations. We will examine the write protection, the security features, and the endurance. We will look at real-world designs from major companies: the parallel NOR Flash used in older printers, the SPI NOR Flash used in many modern printers (e.g., the Winbond W25Q series), the Quad-SPI NOR Flash used in high-performance designs (e.g., the Macronix MX25 series), and the use of the NOR Flash for the firmware update and the font storage. We will also discuss the file system (if any), the boot process, and the firmware update mechanism. By the end, you will understand how the printer stores its 'brain' and its 'character set,' and you will appreciate the critical role of NOR Flash in the printer's operation. |

|
Chapter 1: The Problem - Where Does the Printer Store Its Firmware |
The printer is a complex device that is controlled by a program - the firmware. The firmware is the software that runs on the printer's CPU. The firmware controls the printhead, the motors, the sensors, the communication interfaces, and the user interface. The firmware must be stored in a non-volatile memory - a memory that retains its contents when the power is turned off. The printer also needs to store the font tables - the shapes of the characters (letters, numbers, and symbols) that are used in the labels. The font tables are also non-volatile. The most common non-volatile memory for the firmware and the fonts is the NOR Flash. The NOR Flash is a type of flash memory that is optimized for the random access and the fast read operations. |
Design Example: Firmware Update in a Retail Store |
A retail store uses a label printer. The manufacturer releases a new firmware version that fixes a bug. The store downloads the new firmware and updates the printer via the USB. The new firmware is stored in the NOR Flash. The firmware update is a simple and reliable process. |

|
Chapter 2: What Is NOR Flash- A Non-Volatile Memory |
NOR Flash is a type of non-volatile memory that is used for the code storage and the data storage. The NOR Flash is a flash memory - it can be erased and reprogrammed electrically. The NOR Flash is a random-access memory - any byte can be read directly. The NOR Flash has a fast read speed and a slow write and erase speed. The NOR Flash has a limited number of the write/erase cycles (typically 100,000 cycles). The NOR Flash is used for the firmware, the fonts, and the configuration data. The NOR Flash is available in the parallel and the serial interfaces. The serial interface (SPI, Quad-SPI) is the most common in the modern printers. |
Design Example: Winbond W25Q128 in Brother Printers |
Brother's printer uses a Winbond W25Q128 SPI NOR Flash. The W25Q128 is a 128-megabit (16-megabyte) flash memory. The manufacturer chose the W25Q128 because it is a standard and widely available component. The manufacturer also chose the SPI interface because it uses only a few pins. |
Chapter 3: NOR Flash vs. NAND Flash - A Comparison |
NOR Flash and NAND Flash are two types of flash memory. The NOR Flash has a random access and a fast read speed. The NOR Flash is ideal for the code execution (execute-in-place, or XIP). The NAND Flash has a high density and a low cost, but it has a slower read speed and a block-oriented access. The NAND Flash is used for the data storage (e.g., the file systems). The NOR Flash is used for the firmware and the fonts. The NOR Flash is more expensive than the NAND Flash, but it is faster and more reliable. Many printers use both - the NOR Flash for the firmware and the NAND Flash for the data. |
Design Example: NOR in Zebra Printers |
Zebra's printer uses a NOR Flash for the firmware and a NAND Flash for the label data. The manufacturer chose the NOR Flash for the firmware because of its fast read speed and its random access. |

|
Chapter 4: The NOR Flash Architecture - Cells, Sectors, and Blocks |
The NOR Flash has a hierarchical architecture. The smallest unit is the cell - a single memory cell that stores one bit (or two bits for the multi-level cell). The cells are organized into the sectors. A sector is a group of cells that can be erased together. The sector size is typically 4 kilobytes to 64 kilobytes. The sectors are organized into the blocks. A block is a group of sectors. The block size is typically 64 kilobytes to 256 kilobytes. The erase operation is done at the sector level or the block level. The write operation is done at the byte level (or the word level). The NOR Flash architecture is designed for the code storage. |
Design Example: Architecture in W25Q128 |
The W25Q128 has 256 sectors of 64 kilobytes each. The manufacturer uses the sector-level erase for the firmware updates. The manufacturer erases the old firmware sectors and writes the new firmware. |
Chapter 5: The Parallel Interface - A Legacy Connection |
The older NOR Flash chips use a parallel interface. The parallel interface has a data bus (8 or 16 bits), an address bus (20 to 24 bits), and the control signals (CS, OE, WE). The parallel interface is simple and fast, but it uses many pins. The parallel interface is used in the older printer designs. The parallel interface is being replaced by the serial interfaces. |
Design Example: Parallel NOR in Sato Printers |
Sato's printer (an older model) uses a parallel NOR Flash. The manufacturer chose the parallel NOR because it was the standard at the time. The manufacturer used a 16-bit data bus and a 20-bit address bus. |

|
Chapter 6: The SPI Interface - A Modern Connection |
The modern NOR Flash chips use the SPI (Serial Peripheral Interface) or the Quad-SPI interface. The SPI interface uses 4 pins (CS, SCK, MOSI, MISO). The SPI interface is simple and uses a few pins. The SPI interface is slower than the parallel interface, but it is sufficient for the firmware storage. The Quad-SPI interface uses 6 pins (CS, SCK, IO0, IO1, IO2, IO3) and supports the quad-data transfer. The Quad-SPI is faster than the SPI and is used in the high-performance designs. |
Design Example: Quad-SPI in Brother Printers |
Brother's printer uses a Quad-SPI NOR Flash. The manufacturer chose the Quad-SPI because it provides a fast read speed and uses only a few pins. |
Chapter 7: The Read Operation - A Fast Access |
The read operation is the most common operation. The CPU sends the read command, the address, and the dummy bytes (for the Quad-SPI). The NOR Flash sends the data. The read operation is fast - typically 50 to 100 megabytes per second. The read operation is used to read the firmware and the font data. The read operation is a simple and reliable operation. |
Design Example: Read in Zebra Printers |
Zebra's printer uses the read operation to fetch the firmware instructions. The manufacturer chose the NOR Flash because of its fast read speed. |

|
Chapter 8: The Write Operation - A Slower Process |
The write operation is the process of programming the flash memory. The write operation is slower than the read operation - typically 1 to 10 megabytes per second. The write operation is done in the page mode - the data is written in pages (e.g., 256 bytes). The write operation is used for the firmware updates and the font downloads. The write operation is a more complex process than the read operation. |
Design Example: Write in Brother Printers |
Brother's printer uses the write operation for the firmware update. The manufacturer uses the page program command to write the new firmware. The manufacturer verifies the write by reading back the data. |
Chapter 9: The Erase Operation - A Block-Level Operation |
The erase operation is the process of erasing the flash memory. The erase operation is done at the sector level or the block level. The erase operation is the slowest operation - typically 50 to 500 milliseconds per sector. The erase operation sets all the bits to 1. The erase operation is used before the write operation (the memory must be erased before it can be written). The erase operation is a critical part of the flash memory management. |
Design Example: Erase in Sato Printers |
Sato's printer uses the sector erase operation for the firmware update. The manufacturer erases the old firmware sectors before writing the new firmware. The manufacturer uses the 64-kilobyte sector size. |

|
Chapter 10: The Endurance - A Lifetime Limit |
The NOR Flash has a limited number of the write/erase cycles - typically 100,000 cycles. The endurance is the number of times a sector can be erased and written before it fails. The endurance is a critical parameter for the flash memory. The firmware must be designed to minimize the number of writes. The firmware updates are infrequent, so the endurance is not a problem for the firmware storage. The configuration data may be written more frequently, and the endurance must be considered. |
Design Example: Endurance in Brother Printers |
Brother's printer writes the configuration data to the NOR Flash. The manufacturer uses a wear-leveling technique - the data is written to different sectors to distribute the writes. The manufacturer also uses the EEPROM for the frequently written data. |
Chapter 11: The Write Protection - A Safety Feature |
The NOR Flash has a write protection feature. The write protection prevents the accidental writes. The write protection can be a hardware pin (WP) or a software command. The hardware write protection is a pin that, when asserted, prevents the writes. The software write protection is a register that can be set to protect the sectors. The write protection is a critical safety feature. |
Design Example: Write Protection in Zebra Printers |
Zebra's printer uses the hardware write protection pin. The pin is controlled by the CPU. The CPU asserts the pin during the normal operation and de-asserts it only for the firmware updates. The manufacturer chose the hardware write protection because it is simple and reliable. |

|
Chapter 12: The Security Features - A Protection Against the Cloning |
The NOR Flash has the security features that protect the firmware from the cloning. The security features include the unique ID, the read protection, and the write protection. The unique ID is a serial number that is programmed at the factory. The read protection prevents the unauthorized read of the firmware. The write protection prevents the unauthorized write. The security features are a critical protection for the intellectual property. |
Design Example: Security in Brother Printers |
Brother's printer uses the read protection feature. The read protection prevents the firmware from being read by the external programmer. The manufacturer chose the read protection to protect the firmware from the cloning. |
Chapter 13: The Unique ID - A Serial Number |
The NOR Flash has a unique ID - a 64-bit or a 128-bit serial number. The unique ID is programmed at the factory. The unique ID cannot be changed. The unique ID is used for the device identification and the security. The unique ID is a useful feature for the anti-counterfeiting. |
Design Example: Unique ID in Sato Printers |
Sato's printer uses the unique ID for the device identification. The manufacturer uses the unique ID to track the printers. The manufacturer also uses the unique ID for the security. |

|
Chapter 14: The Software Interface - A Flash Driver |
The software interface is the flash driver - a software library that provides the functions to read, write, and erase the flash memory. The flash driver is a critical part of the firmware. The flash driver abstracts the hardware details. The flash driver provides the functions like flash_init, flash_read, flash_write, and flash_erase. The flash driver is a simple and reliable software module. |
Design Example: Driver in Brother Printers |
Brother's printer uses a flash driver that is provided by the microcontroller manufacturer. The driver provides the functions to read, write, and erase the flash. The manufacturer used the driver to access the NOR Flash. |
Chapter 15: The Boot Process - A Power-On Sequence |
The boot process is the power-on sequence that loads the firmware from the NOR Flash. The CPU starts executing the boot code from the internal ROM. The boot code initializes the NOR Flash and reads the firmware from the NOR Flash. The boot code then jumps to the firmware. The boot process is a critical part of the printer's startup. |
Design Example: Boot in Zebra Printers |
Zebra's printer uses a bootloader that is stored in the internal ROM. The bootloader reads the firmware from the NOR Flash and verifies the checksum. The bootloader then jumps to the firmware. The manufacturer chose the bootloader because it provides a secure and reliable boot. |

|
Chapter 16: The Firmware Update - A Field Upgrade |
The firmware update is a field upgrade that replaces the old firmware with the new firmware. The firmware update is typically done via the USB, the Ethernet, or the wireless connection. The firmware update is a critical feature for the bug fixes and the new features. The firmware update is a complex process that involves the reading, the erasing, and the writing of the NOR Flash. |
Design Example: Update in Brother Printers |
Brother's printer supports the firmware update via the USB. The user downloads the new firmware file to the USB drive and inserts the drive into the printer. The printer reads the file, erases the old firmware, and writes the new firmware. The manufacturer chose the USB update because it is simple and convenient. |
Chapter 17: The Font Storage - The Character Tables |
The font storage is the storage of the character tables. The font tables contain the pixel data for the characters - the letters, the numbers, and the symbols. The font tables are stored in the NOR Flash. The CPU reads the font data from the NOR Flash and renders the characters on the label. The font storage is a critical part of the label rendering. |
Design Example: Fonts in Sato Printers |
Sato's printer stores the font tables in the NOR Flash. The manufacturer uses the fonts for the label printing. The manufacturer also allows the user to download the custom fonts to the NOR Flash. |

|
Chapter 18: The Font Rendering - A Software Process |
The font rendering is the software process that converts the character code to the pixel data. The font rendering reads the font data from the NOR Flash and places the pixels in the frame buffer. The font rendering is a simple and efficient process. The font rendering is a critical part of the label generation. |
Design Example: Rendering in Brother Printers |
Brother's printer uses a simple font rendering routine. The routine reads the font data from the NOR Flash and writes it to the frame buffer. The manufacturer chose the simple routine because it is fast and reliable. |
Chapter 19: The Configuration Storage - The Settings |
The configuration storage is the storage of the printer's settings - the print speed, the darkness, the label size, and the sensor thresholds. The configuration data is stored in the NOR Flash (or in the EEPROM). The configuration data is read at the power-on and is written when the settings are changed. The configuration storage is a critical part of the printer's operation. |
Design Example: Configuration in Zebra Printers |
Zebra's printer stores the configuration data in the NOR Flash. The manufacturer chose the NOR Flash for the configuration storage because it is non-volatile and reliable. |

|
Chapter 20: The File System - A Data Organization |
Some printers use a file system (e.g., the FAT file system) to organize the data in the NOR Flash. The file system allows the user to store and manage the files - the fonts, the graphics, and the labels. The file system is a convenient way to manage the data. The file system is typically used in the printers with the large NOR Flash (e.g., 32 MB or 64 MB). |
Design Example: File System in Brother Printers |
Brother's printer uses a FAT file system on the NOR Flash. The manufacturer chose the FAT file system because it is compatible with the Windows and the Mac. The user can copy the font files and the graphic files to the printer via the USB. |
Chapter 21: The Wear Leveling - A Lifetime Extension |
The wear leveling is a technique that extends the lifetime of the flash memory. The wear leveling distributes the writes across the sectors. The wear leveling prevents the frequent writes to the same sector. The wear leveling is typically used for the data storage (e.g., the file systems). The wear leveling is not always used for the firmware storage. |
Design Example: Wear Leveling in Sato Printers |
Sato's printer uses the wear leveling for the configuration data. The manufacturer wrote a simple wear-leveling routine that rotates the write location. The manufacturer chose the wear leveling to extend the lifetime of the flash. |

|
Chapter 22: The Bad Block Management - A Fault Handling |
The NOR Flash can have the bad blocks - the blocks that are defective. The bad block management is a technique that handles the bad blocks. The bad block management identifies the bad blocks and skips them. The bad block management is typically used in the NAND Flash. The NOR Flash has a low defect rate, so the bad block management is not always used. |
Design Example: Bad Blocks in Brother Printers |
Brother's printer does not use the bad block management. The manufacturer chose not to use it because the NOR Flash has a low defect rate. |
Chapter 23: The System Integration - A Complete Storage System |
We have now covered the NOR Flash. Let us put it all together. The NOR Flash stores the firmware, the fonts, and the configuration. The CPU reads the firmware from the NOR Flash and executes it. The CPU reads the fonts and the configuration from the NOR Flash. The NOR Flash is a complete storage system. |
Chapter 24: The Future of NOR Flash - A Decline |
The future of NOR Flash is uncertain. The NAND Flash is becoming cheaper and faster. The NAND Flash is used for the high-density storage. The NOR Flash is still used for the code storage because of its random access and its fast read speed. However, the emergence of the eMMC and the UFS is challenging the NOR Flash. The future printers may use the eMMC or the UFS for the firmware and the fonts. |

|
Chapter 25: The eMMC - An Alternative Storage |
The eMMC (Embedded Multi-Media Card) is a storage device that integrates the NAND Flash and the controller. The eMMC has a high density and a fast speed. The eMMC is used in the smartphones and the tablets. The eMMC is becoming more common in the printers. |
Design Example: eMMC in Zebra Printers |
Zebra's printer uses an eMMC for the firmware and the fonts. The manufacturer chose the eMMC because it has a high density and a fast speed. |
Chapter 26: The System Integration - A Complete Design |
We have now covered the complete memory system. The NOR Flash stores the firmware and the fonts. The SDRAM stores the frame buffer. The EEPROM stores the configuration. The memory system is a complete design. |

|
Chapter 27: The End User - The Ultimate Beneficiary |
The end user is the ultimate beneficiary of the NOR Flash. The NOR Flash stores the firmware that runs the printer. The NOR Flash stores the fonts that are used for the labels. The NOR Flash is a critical component that makes the printer work. |
Chapter 28: The Future - Smarter and Faster |
The future of the storage lies in the smarter and faster solutions. The future printers will have a larger and faster storage. The future printers will be able to print the more complex labels at a higher speed. |

|
Detailed Summary - Tying It All Together |
We have now completed our comprehensive exploration of the NOR Flash memory - the non-volatile storage for the firmware, the fonts, and the configuration data. We began by understanding the problem: the printer needs a non-volatile memory that retains its contents when the power is turned off. We learned that the NOR Flash is the ideal memory for this purpose because of its random access, its fast read speed, and its reliability. |
We explored the NOR Flash architecture - the cells, the sectors, and the blocks. We saw how the NOR Flash is organized and how the erase, write, and read operations work. We examined the different interfaces - the parallel interface and the serial interface (SPI and Quad-SPI). We looked at the practical aspects: the read operation, the write operation, the erase operation, the endurance, the write protection, and the security features. |
We discussed the software - the flash driver, the boot process, the firmware update, the font storage, the font rendering, and the configuration storage. We saw how the firmware is loaded at the power-on, how the fonts are used to render the characters, and how the configuration is stored and retrieved. |
We looked at the advanced topics: the file system, the wear leveling, and the bad block management. We looked to the future with the eMMC and the UFS. |
The overarching lesson is that the NOR Flash is a critical component of the printer. It stores the printer's 'brain' (the firmware) and its 'character set' (the fonts). A well-designed NOR Flash system provides a reliable, secure, and high-performance storage. A poorly designed system causes the boot failures, the font errors, and the data corruption. Understanding the NOR Flash is essential for any engineer who wants to design a reliable printer, and this chapter has provided that understanding from the basic principles of the flash cell to the advanced techniques of the wear leveling and the file system. |
End of Extended Section 27 |