/parallel

General purpose C library for parallel communications on Raspberry Pi

Primary LanguagePythonGNU General Public License v2.0GPL-2.0

parallel

This repository is dedicated to fast parallel communications on Raspberry Pi. The speed is essential when communicating with large liquid crystal displays, as a lot of data has to be transferred for a single full screen picture. Note that serial SPI communication is used for some devices that have SPI communication that is fast enough.

No additional library or program is used - instead C code is written to use standard Linux driver for pin access and SPI communication.

Main library

parallel.c

General purpose C library for parallel communications on Raspberry Pi

  • supports 6800 and 8080 protocols, both 4 bits and 8 bits
  • supports arbitrary GPIO pins from 0 to 27
  • supports writing and reading, reading is optional
  • supports objective oriented programming, initialisation returns the pointer to chip instance
  • all RPi data lines by default in read/input mode in order to avoid possible conflict and destruction of GPIO pins

Times

* on writing between two half-bytes (4 bits protocol): tclock; on writing after full byte: tproc; on reading between two half-bytes (4 bits protocol): larger of tclock and thold; on reading after full byte: larger of tproc and thold.

More information on parallel protocols

parallel.so

C library compiled for use with Python

spi.c

C library made to use standard Linux driver SPI communication

spi.so

C library compiled for use with Python

Examples of use: HD44780

HD44780.py

Python library for HD44780 controller chip (requires parallel.so)

HD44780_test.py

Python test file for the Python Library (reqires HD44780.py)

The result

Note: If you don't want to control backlight from the program, set bl=-1. If you are not interested in backlight PWM, set pwm=False. If there are problems, try to make waiting times longer.

More information on HD44780

Examples of use: RA6963

RA6963.py

Python library for RA6963 controller chip (requires parallel.so)

RA6963_test.py

Python test file for the Python Library (reqires RA6963.py)

The result

Note: If you don't want to control backlight from the program, set bl=-1. If you are not interested in backlight PWM, set pwm=False. If there are problems, try to make waiting times longer.

More information on RA6963

Examples of use: ST7565

ST7565.py

Python library for ST7565 controller chip (requires spi.so)

ST7565_test.py

Python test file for the Python Library (reqires ST7565.py)

The result

Note: If you don't want to control backlight from the program, set bl=-1. If you are not interested in backlight PWM, set pwm=False. If there are problems, try to make waiting times longer.

More information on ST7565

Examples of use: ST7920

ST7920.py

Python library for ST7920 controller chip (requires parallel.so)

ST7920_test.py

Python test file for the Python Library (reqires ST7920.py)

The result

Note: If you don't want to control backlight from the program, set bl=-1. If you are not interested in backlight PWM, set pwm=False. If there are problems, try to make waiting times longer.

More information on ST7920

Examples of use: SSD1680

SSD1680.py

Python library for SSD1680 controller chip (requires spi.so)

SSD1680_test.py

Python test file for the Python Library (reqires SSD1680.py)

The result

More information on SSD1680