Figure 8—The 4-bit nibbles are generated in real time for each of the LCD’s scan lines based on the position of the first and last black pixel on that column. The firmware first calculates how many 0000s must be sent, and then two things can happen: If all the black pixels to draw are in the same nibble, then a combined white/black/white nibble is extracted from a table and sent to the display (on the right). Otherwise, one white/black transition nibble is sent, followed by the required number of full black nibbles, and followed by one black/white transition nibble (on the left).