Giter VIP home page Giter VIP logo

us2066-spin's Introduction

us2066-spin


This is a P8X32A/Propeller, P2X8C4M64P/Propeller 2 driver object for US2066-based alphanumeric OLED displays

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 400kHz
  • Set contrast level
  • Set cursor attributes: blinking, inverted, shape
  • Set text attributes: double-height, 5 and 6-pixel width text
  • Inverted/normal display
  • Display mirroring (horizontal/vertical/both)

Requirements

P1/SPIN1:

  • spin-standard-library
  • P1/SPIN1: 1 extra core/cog for the PASM I2C engine
  • terminal.common.spinh (provided by spin-standard-library)

P2/SPIN2:

  • p2-spin-standard-library
  • terminal.common.spin2h (provided by p2-spin-standard-library)

Compiler Compatibility

Processor Language Compiler Backend Status
P1 SPIN1 FlexSpin (5.9.14-beta) Bytecode OK
P1 SPIN1 FlexSpin (5.9.14-beta) Native code OK
P1 SPIN1 OpenSpin (1.00.81) Bytecode Untested (deprecated)
P2 SPIN2 FlexSpin (5.9.14-beta) NuCode FTBFS
P2 SPIN2 FlexSpin (5.9.14-beta) Native code Not yet implemented
P1 SPIN1 Brad's Spin Tool (any) Bytecode Unsupported
P1, P2 SPIN1, 2 Propeller Tool (any) Bytecode Unsupported
P1, P2 SPIN1, 2 PNut (any) Bytecode Unsupported

Limitations

  • No scrolling support (chipset has horizontal scrolling support)
  • No support for custom characters
  • No support for parallel interface (not planned)
  • No support for SPI interface

us2066-spin's People

Contributors

avsa242 avatar

Watchers

 avatar  avatar  avatar

us2066-spin's Issues

Implement scrolling

The scrolling functionality of the display controller hasn't been implemented in the object yet.
Implement the basic functionality and demonstrate it in the demo top-level object.

Implement API compatibility with serial LCD drivers

Try to make the driver as much of a drop-in replacement for Parallax's Serial_Lcd.spin (or display.lcd.serial.spin equivalent) driver as possible, so that a developer wishing to migrate their project from LCD to OLED will have less difficulty doing so.

Simplify Defaults*()

Create a new Defaults() method that has only POR default settings, and move the other display size-specific settings to Preset_*() methods.

Add support for custom-defined characters

The display controller has support for multiple user-defined characters. Add support for this. It should work as consistently as possible with that of the serial alpha LCD driver in the spin-standard-library.

FTBFS: ClearLine() column/row validation code not accepted by FlexSpin

The spin1 driver uses a different method of validating the row/column in ClearLine(). Instead of an if statement as in the spin2 driver, a lookdown() is used. When using FlexSpin to build (native code), ranges in lookdown(z) must be constants, but a variable is used here. For simplicity, copy the spin2 validation code into the spin1 driver.

Remove trans_type param from writeReg()

This is legacy code that was obsoleted when wrdata() was created. It just adds extra code space and run-time overhead now, as it's not used by any driver methods.

ClearLine() hardcoded for 4x20char displays

ClearLine() draws a fixed 20 spaces and accepts 3rd and 4th rows, irrespective of display size.
Display line should be validated against display total rows before continuing, and number of spaces drawn should equal total display columns.

Char() hardcoded for 4x20 displays

The addressing within the display's RAM as well as the cursor position updating are hardcoded for 4x20 displays.

Determine address bounds per line as well as proper update cursor position dynamically.

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.