Lab 1 - OLED, GPIO, Interrupt
Lab 1 - OLED, GPIO, Interrupt
Graphical User Interfaces (GUIs) are integrated components in many embedded systems which
allow displaying graphical icons and texts. In the EVALBOT, an Organic LED (OLED) display
with 96x16 pixel resolution is provided. In the first part of this lab, we will use driver functions
to write texts on the display and create a new function to draw lines.
Graphical displays have a driver Integrated Circuit (IC) to control pixels on the panel. The
OLED display in the EVALBOT uses SSD1307 as the driver which allows microcontroller to
have access to the pixels through the I2C interface. Graphical Display Data RAM (GDDRAM) is
a buffer holding the bit pattern to be displayed on the screen. Each byte of GDDRAM is
dedicated to 8 pixels on the display panel. The GDDRAM page structure of SSD1307 is as
follows:
StellarisWare provides a library to interface GDDRAM and allows users sending control
command. This library is available in \StellarisWare\boards\ek-evalbot\drivers named
<display96x16x1.c>.
In the second part of this lab, you will get familiarized with the General Purpose Input/Outputs
(GPIOs) in the Stellaris Cortex M3 microcontrollers.
1 Lab Objectives
2 Pre-Lab
Get yourself familiar with the functions in the <display96x16x1.c> and the structure of the
font. Furthermore, create a function to draw a line (draw_line) in advance.
Read chapter 8 of Stellaris LM3S9B92 datasheet to learn how to set the direction, change the
output values and enable interrupts for the GPIOs. You will also need to review sensor.c and
io.c in the \StellarisWare\boards\ek-evalbot\drivers to find out how to control the GPIOs.
3 Lab Procedure
Repeat all the steps you learned in Lab0 to create a new project in CCSv5. You might need
to add other resources to your projects.
Write a program to display Hello World []. The last character is your new character.
ROM_GPIOPinTypeGPIOOutput
ROM_GPIOPadConfigSet
ROM_GPIOPinRead
ROM_GPIOPinWrite
5 Lab Report
Include the following items in your report:
Answers to Questions
Create a zip file for your codes for Sections 3.1, 3.2, 3.3, 3.4 and 3.5 and email it to
the TAs along with the report.
6 Documents
There are many useful documents you will need as references for this lab including:
o Stellaris Robotic Evaluation Board (EVALBOT) User's Manual This document
contains all the information about the EVALBOT you will be using, some of which will
be reproduced here. Designated spmu166 and available at the following URL
http://www.ti.com/lit/ug/spmu166/spmu166.pdf
o Stellaris LM3S9B92 Microcontroller Data Sheet - This document contains hardware
information about the LM3S9B92 device itself and its specifications. In this document
you can also find all registers, modules and peripherals information.
http://www.ti.com/lit/ds/symlink/lm3s9b92.pdf
o Stellaris Peripheral Driver Library Users Guide This document describes set a set
of drivers for accessing the peripherals found on the Stellaris family of ARM Cortex M
based microcontrollers.
http://www.ti.com/lit/ug/spmu019m/spmu019m.pdf
o OLED/PLED Segment/Common Driver with Controller SSD1307 This document
describes the structure of memories that control pixels on OLED.
http://www.trulydisplays.com/oled/specs/IC%20SSD1307%20Spec.pdf