Giter Site home page Giter Site logo

avsa242 / ssd130x-spin Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 434 KB

P8X32A/Propeller, P2X8C4M64P/Propeller 2 driver object for SSD130x OLED displays

License: MIT License

Propeller Spin 100.00%
p8x32a propeller driver spin ssd1306 oled 128x32 128x64 monochrome i2c

ssd130x-spin's Introduction

ssd130x-spin


This is a P8X32A/Propeller 1, P2X8C4M64P/Propeller 2 driver object for the Solomon Systech SSD130x OLED display controller.

IMPORTANT: This software is meant to be used with the spin-standard-library (P8X32A) or p2-spin-standard-library (P2X8C4M64P). Please install the applicable library first before attempting to use this code, otherwise you will be missing several files required to build the project.

Salient Features

  • I2C connection at up to approx 400kHz (unenforced) (NOTE: Datasheet specifies max I2C clock of 400kHz. May function at higher bus speeds. YMMV!)
  • SPI connection at fixed 4MHz (P1), up to 10MHz (P2, unenforced) (NOTE: Datasheet specifies max SPI clock of 10MHz. May function at higher bus speeds. YMMV!)
  • Supports 128x32 and 128x64 displays
  • Display mirroring (horizontal and vertical)
  • Display visibility modes: normal, inverted, all pixels on
  • Variable contrast
  • Low-level display control: Logic voltages, oscillator frequency, addressing mode, row/column mapping
  • Supports display modules with or without discrete RESET pin
  • Integration with the generic bitmap graphics library
  • Buffered display or direct-to-display drawing (see 'Limitations' for direct-to-display)
  • Hardware-accelerated scrolling (horizontal L/R, combined vertical and horizontal L/R)

Requirements

P1/SPIN1:

  • spin-standard-library
  • P1/SPIN1: 1 extra core/cog for the PASM I2C or SPI engine, as applicable
  • graphics.common.spinh (provided by spin-standard-library)
  • (WIDTH * HEIGHT) / 8 bytes of RAM for the display, if buffered mode is used (default)

P2/SPIN2:

  • p2-spin-standard-library
  • graphics.common.spin2h (provided by p2-spin-standard-library)
  • (WIDTH * HEIGHT) / 8 bytes of RAM for the display, if buffered mode is used (default)

Compiler Compatibility

Processor Language Compiler Backend Status
P1 SPIN1 FlexSpin (6.8.0) Bytecode OK
P1 SPIN1 FlexSpin (6.8.0) Native/PASM OK
P2 SPIN2 FlexSpin (6.8.0) NuCode OK
P2 SPIN2 FlexSpin (6.8.0) Native/PASM2 OK

(other versions or toolchains not listed are not supported, and may or may not work)

Hardware Compatibility

  • SSD1306 (tested)
  • SSD1309 (tested)

Limitations

  • Doesn't support parallel interface-connected displays (currently unplanned)
  • Unbuffered/Direct-draw operations are limited, due to the nature of serial 1bpp displays. Box(), Line(), Circle and Plot() aren't implemented.

ssd130x-spin's People

Contributors

avsa242 avatar

Watchers

 avatar  avatar  avatar

ssd130x-spin's Issues

address() should be split into discrete R/W methods

This really doesn't need to be crammed into one method and should be split into two for simplicity.
Rename address() to set_address() (with alias to the name address so existing code doesn't break) and move the read code to a new method get_address().

Handle other display sizes

The driver is currently hardcoded for 128x32 displays, though the controller supports up to 128x64, and other sizes are available. Implement a mechanism for runtime or compile-time display size selection.

Implement scrolling

The SSD1306 provides a mechanism for hardware-based horizontal and vertical scrolling of the display. Unrelated to the mostly-genericized software scrolling in the bitmap graphics library.

Add support for different charge pump voltages

The display controller actually supports four different charge pump voltages, but currently only two are supported, and not exposed to the user. It's currently written more like 'enabled or disabled.'
It should also be renamed to something like ChargePumpVoltage().

Implement text rendering

Currently, the driver implements a few basic primitives (points, lines, circles) - implement text rendering using a RAM font and/or the Propeller-ROM font.

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.