Skip to content

Latest commit

 

History

History

addressing

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Addressing

The display is 84x48 pixels, 504 bytes, divided into 6 banks of 84x8 pixels, 84 bytes each.

You can configure the display to draw consecutive bytes moving horizontally or vertically.

In both modes, each byte is drawn to the display as a vertical column of 8 pixels. You are unable to draw 8 horizontal pixels from a single byte. The least significant bit in each byte is displayed at the top.

In horizontal mode, every subsequent byte is drawn beside the current byte until the end of the bank, then moves to the start of the next bank.

Horizontal

In vertical mode, every subsequent byte is drawn in the same column on the next bank until the last bank, where it wraps back to the first bank and moves across one column.

Vertical

Changing the addressing mode does not affect what is already displayed on the screen. It only affects the position the next bytes are drawn.

Example 1

The Nokia example image:

Nokia

Horizontal addressing mode:

Horizontal

Horizontal addressing is compatible with framebuf.MONO_VLSB

0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x40, 0x80, 0x80, 0xC0, 0xC0, 0x40, 0xC0, 0xA0, 0xE0, 0xC0, 0xE0, 0xE0, 0xF0, 0xF0, 0xF8, 0xF8, 0xF8, 0xFC, 0xFC, 0xFE, 0xEE, 0xF4, 0xF0, 0xF0, 0x70, 0x30, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x0C, 0x9C, 0x1C, 0x38, 0xB8, 0x38, 0x38, 0xB8, 0xF8, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF8, 0xF8, 0xF8, 0xF8,
0x88, 0x20, 0x8A, 0x20, 0x08, 0x22, 0x08, 0x00, 0x0A, 0x00, 0x00, 0x02, 0x80, 0x71, 0xBA, 0xDA, 0xFD, 0xDD, 0xED, 0xDE, 0xEE, 0xF7, 0xFF, 0xFB, 0xFD, 0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, 0xF0, 0xFF, 0xFF, 0xFE, 0xFC, 0xF8, 0xF0, 0xF0, 0xF1, 0xF3, 0xF7, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xF3, 0xF0, 0xF0, 0xF0, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xF0, 0xF0, 0xF0, 0xF3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
import pcd8544
from machine import Pin, SPI

spi = SPI(1)
spi.init(baudrate=2000000, polarity=0, phase=0)
cs = Pin(2)
dc = Pin(15)
rst = Pin(0)
bl = Pin(12, Pin.OUT, value=1)

lcd = pcd8544.PCD8544(spi, cs, dc, rst)

lcd.init(horizontal=True)
lcd.data(bytearray(b'\x80\x00\x00\x80\x00\x00\x80\x00\x00\x80\x00\x00\x80\x00\x00\x80\x00\x00\x80\x80\x40\x40\x40\x80\x80\xC0\xC0\x40\xC0\xA0\xE0\xC0\xE0\xE0\xF0\xF0\xF8\xF8\xF8\xFC\xFC\xFE\xEE\xF4\xF0\xF0\x70\x30\x00\x80\x00\x00\x80\x00\x0C\x9C\x1C\x38\xB8\x38\x38\xB8\xF8\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF0\xF8\xF8\xF8\xF8\x88\x20\x8A\x20\x08\x22\x08\x00\x0A\x00\x00\x02\x80\x71\xBA\xDA\xFD\xDD\xED\xDE\xEE\xF7\xFF\xFB\xFD\xFD\xFE\xFF\x7F\x3F\x1F\x9F\x3F\x7F\x6F\x0F\xAF\x1F\xBF\x3E\x3C\x7A\x78\x70\x22\x88\xA0\x2A\x80\x08\x62\xE0\xE0\xF2\xF0\x58\xDA\xF8\xFC\x92\xFE\xFF\xFF\xD3\xFF\xFD\xF3\xE1\xF0\xF9\x7F\xBF\x3F\x8F\x2F\x4F\xAF\x0F\x4F\xA7\x0F\xAF\x87\x2F\x82\x80\x20\xC0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F8, 0x87, 0xAA, 0xB5, 0xF7, 0xFF, 0xF8, 0x2F, 0x52, 0x5B, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
import pcd8544
from machine import Pin, SPI

spi = SPI(1)
spi.init(baudrate=2000000, polarity=0, phase=0)
cs = Pin(2)
dc = Pin(15)
rst = Pin(0)
bl = Pin(12, Pin.OUT, value=1)

lcd = pcd8544.PCD8544(spi, cs, dc, rst)

lcd.init(horizontal=False)
lcd.data(bytearray(b'\x80\x88\x82\xFE\xAB\xFF\x00\x20\x80\xFF\xFF\xFF\x00\x8A\x20\xFF\xFD\xFF\x80\x20\xC0\xFE\xF7\xFE\x00\x08\x80\xFD\xFF\xFF\x00\x22\x80\xFF\x01\xF0\x80\x08\x50\xFF\x01\xF0\x00\x00\x40\xFF\x01\xF0\x00\x0A\xC4\xFE\x01\xF0\x80\x00\xD0\xFF\xE1\xFF\x00\x00\xA0\xFF\xC1\xFF\x00\x02\xE8\xFF\x81\xFF\x80\x80\xE4\xFF\x03\xFF\x00\x71\xEA\xFF\x05\xFE\x00\xBA\xFF\xFF\x0F\xFC\x80\xDA\xFB\xFF\x1D\xF8\x00\xFD\xFD\xFF\x2F\xF0\x00\xDD\xFF\xFF\x7E\xF0\x80\xED\xFF\xFF\x01\xF0\x80\xDE\xFF\xFF\x00\xF0\x40\xEE\xFF\xFF\x01\xF0\x40\xF7\xFF\x7F\x01\xF0\x40\xFF\xEF\xFF\xFF\xFF\x80\xFB\x4F\xFE\xFE\xFF\x80\xFD\x27\xBF\x03\xF8\xC0\xFD\x53\x7F\x01\xF0\xC0\xFE\xA8\xBF\x01\xF0\x40\xFF\x54\xBF\x00\xF0\xC0\x7F\x29\xFF\xF1\xF1\xA0\x3F\x4A\xDF\xF0\xF1\xE0\x1F\xB5\xBF\x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F0\xAF\xBA\xE8\x3B\xF0\xF0\x0F\xA4\x55\xEF\xF0\xF0\x4F\x49\xEF\xFE\xF3\xF0\xA7\x5A\xB9\xFB\xFF\xF8\x0F\xA2\xD6\xEE\xFF\xF8\xAF\x54\xED\x7D\xFF\xF8\x87\xAA\xB5\xF7\xFF\xF8\x2F\x52\x5B\xFF\xFF'))

Example 2

Draw one byte at a time.

import pcd8544
from machine import Pin, SPI

spi = SPI(1)
spi.init(baudrate=2000000, polarity=0, phase=0)
cs = Pin(2)
dc = Pin(15)
rst = Pin(0)
bl = Pin(12, Pin.OUT, value=1)

lcd = pcd8544.PCD8544(spi, cs, dc, rst)
lcd.init()

Horizontal addressing mode:

lcd.clear()
lcd.position(0, 0)
lcd.addressing(horizontal=True)

# pixels 0,0 to 0,7
lcd.data(bytearray(b'\xff'))

# pixels 1,0 to 1,7
lcd.data(bytearray(b'\xff'))

# pixels 2,0 to 2,7
lcd.data(bytearray(b'\xff'))

# pixels 3,0 to 3,7
lcd.data(bytearray(b'\xff'))

Vertical addressing mode:

lcd.clear()
lcd.position(0, 0)
lcd.addressing(horizontal=False)

# pixels 0,0 to 0,7
lcd.data(bytearray(b'\xff'))

# pixels 0,8 to 0,15
lcd.data(bytearray(b'\xff'))

# pixels 0,16 to 0,23
lcd.data(bytearray(b'\xff'))

# pixels 0,24 to 0,31
lcd.data(bytearray(b'\xff'))

# pixels 0,32 to 0,39
lcd.data(bytearray(b'\xff'))

# pixels 0,40 to 0,47
lcd.data(bytearray(b'\xff'))

# pixels 1,0 to 1,7
lcd.data(bytearray(b'\xff'))

Example 3

Stripes

lcd.clear()
lcd.addressing(horizontal=True)
# \\\\
lcd.data(bytearray([0x11,0x22,0x44,0x88]*126))
# ////
lcd.data(bytearray([0x88,0x44,0x22,0x11]*126))
# \/\/
lcd.data(bytearray([0x81,0x42,0x24,0x18]*126))
# ||||
lcd.data(bytearray([0xff,0x00]*252))
# ====
lcd.data(bytearray([0x55]*504))