beautypg.com

Chipkit basic i/o shield hardware description – Digilent 410-216P-KIT User Manual

Page 4

background image

chipKIT Basic I/O Shield Reference Manual

www.digilentinc.com

page 4 of 15

Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.

chipKIT Basic I/O Shield Hardware Description


Introduction


The following gives a basic description of the
input/output hardware contained in the Basic
I/O Shield and how to use it. Refer to Appendix
A for a table showing pin definitions, and
Appendix B for example code to use the OLED
graphic display.

OLED Graphic Display


The Basic I/O board provides a 128x32 pixel,
Organic LED (OLED), graphic display panel.
The graphic display panel used is the
WiseChip/Univision UG-23832HSWEG04. This
display uses the Soloman Systech SSD1306
display controller.

The UG2832 has a power on/power off
sequence that should be followed. Failure to
follow the power on/power off sequence can
shorten the life of the display. The Basic I/O
provides two FETs for software control of the
two power supplies for the display. The
VDD_EN control is used to turn on/off the
power to the logic of the display. The
VBAT_EN control is used to turn on/off power
to the OLED display itself. These two pins
have pull-up resistors to turn off their
respective power supplies when not being
driven. The pin is made an output and driven
low to turn on the power supply.

Power on sequence:

Apply power to VDD
Send Display Off command
Initialize display to desired operating mode
Clear screen
Apply power to VBAT
Delay 100ms
Send Display On command

Power off sequence:

Send Display Off command
Power off VBAT
Delay 100ms
Power off VDD


The display has a D/C pin (display or
command select) that is used to determine
whether bytes sent to the display are
interpreted as commands or as display data.
The D/C pin is set HIGH for display buffer
access and LOW for command access.

The RES pin is used to reset the SG1306
display controller. The RES pin is driven LOW
for reset and driven HIGH for normal operation.
The low going reset pulse must be a minimum
of 3us (microseconds) for the display controller
to reset correctly.

The UG2832 is a serial device that is accessed
using SPI. It is however, a write-only device. It
is not possible to read back either the display
buffer contents or any kind of status from the
panel. The maximum SPI clock frequency
supported by the UG2832 is 10Mhz. Due to pin
limitations between the Basic I/O and the
Uno32 board, the select pin (SS) is wired low
on the Basic I/O board and the display is
always enabled to receive data over the SPI
interface.

Digilent has a library for use with the Basic I/O
that provides functions for initializing the
display and rendering simple text and graphics
onto the display. This library can be used as-is
or as a starting point for a more sophisticated
graphics library. This library is available on the
Digilent web site and in the third part libraries
repository on github.

Appendix B provides example code that shows
initializing the display and writing to it.