Git Product home page Git Product logo

er-oledm032-1's Introduction

ER-OLEDM032-1

The ER-OLEDM032-1 is a 256x64 graphical OLED display. Each pixel is a 4-bit gray-scale value.

http://www.buydisplay.com/default/oled-3-2-inch-displays-module-companies-with-driver-circuit-blue-on-black

The display board has four different interface options. I used the 4-wire SPI mode in this project to connect the display to a Raspberry Pi.

Hardware

The display has four different interface modes selected by jumpers on the back of the board. The jumpers are actually two 0 Ohm surface mount resistors you must move to select the desired interface. See the interface documentation for details.

https://github.com/topherCantrell/ER-OLEDM032-1/blob/master/docs/ER-OLEDM032-1_Interfacing.pdf

The interface options are:

  • 8-bit parallel for 6800 series microprocessor
  • 8-bit parallel for 8080 series microprocessor
  • 3-wire SPI interface
  • 4-wire SPI interface

My board arrived with the jumpers set for "8-bit parallel for 6800 series microprocessor". I carefully changed the jumpers to "4-wire SPI interface".

Usually "4-wire SPI" means that both MOSI and MISO wires are used in a bidirectional connection. Usually "3-wire SPI" means that MOSI and MISO are combined into a single SI/SO line that handles communication.

The SPI interface to the ER-OLEDM032 never sends data back to the processor. Despite the "3-wire" and "4-wire" terminology in the display documentation the interface is ALWAYS the traditional-4-wire-SPI, but the MISO wire is ignored.

The term "4-wire" in the documentation refers to an extra signaling wire that is unrelated to the SPI interface.

You talk to the display by sending a COMMAND byte followed by several DATA bytes. You must tell the display whether the byte you are writing is to be interpreted as a COMMAND or DATA. In the "4-wire" interface option you use a separate wire to select COMMAND or DATA. In the "3-wire" interface option you send the select as the first bit in a NINE bit SPI sequence.

The native SPI library on the Raspberry Pi has trouble sending 9-bit bytes. I used the extra COMMAND/DATA wire and normal 8-bit SPI writes.

Software

The display uses a Solomon Systech chip, the SSD1322, to drive the display. The CMOS chip has many control registers and command sequences described in the reference manual:

https://github.com/topherCantrell/ER-OLEDM032-1/blob/master/docs/SSD1132.pdf

The chip is designed for a 480x128 OLED display, but its registers can be configured to work with the 256x64 display.

The company has published demo code for the 256x64 display. The code is written in C. The code includes the initialization sequence and routines to draw on the display.

https://github.com/topherCantrell/ER-OLEDM032-1/blob/master/docs/ER-OLEDM032-1_DemoCode.txt

I translated this C code to Python for use on the Raspberry Pi. See pi/RPI_OLED.py in this project.

The demo code initializes the display and draws several screens. Then it enters a loop allowing you to type in new contrast values (0 to 255).

These photographs of the running display (pardon the poor quality) show several of the screens from the demo.

er-oledm032-1's People

Contributors

tophercantrell avatar johnrees avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.