diff --git a/examples/spi_oled/README.md b/examples/spi_oled/README.md index 39a3552fb74274a939490419297609409236ffee..36eb8b3fcacda15cd7710bf74a02d315e5e6da20 100644 --- a/examples/spi_oled/README.md +++ b/examples/spi_oled/README.md @@ -3,16 +3,25 @@ This example code demonstrates use of the CH32V003 SPI peripheral with an SSD130 OLED. Three different OLED sizes are supported - 64x32, 128x32, and 128x64. It provides a generic SPI port initialization and transmit (write-only) low level interface and a high-level graphics driver with pixels, lines, circles, rectangles -and 8x8 character font rendering. Out of the box this demo cycles through a few -different graphic screens to test out the various drawing primitives. +and 8x8 character font rendering. Out of the box this demo runs Conway's Life. + + + +https://user-images.githubusercontent.com/1132011/236727389-7b778260-87c0-43a8-89e1-8a5459719fdd.mp4 + + ## Build options -There are two build-time options in the oled.h source: +There are two build-time options in the source- + +In spi_oled.c: +* SSD1306_64X32, SSD1306_128X32, SSD1306_128X64 - choose only one of these +depending on the type of OLED you've got. + +in ssd1306.h: * SSD1306_PSZ - the number of bytes to send per SPI data packet. The default value of 32 seems to work well. Smaller values are allowed but may result in slower refresh rates. -* SSD1306_64X32, SSD1306_128X32, SSD1306_128X64 - choose only one of these -depending on the type of OLED you've got. ## Use Connect an SSD1306-based OLED in SPI interface mode as follows: