SSeerriiaall LLCCDD DDiissppllaayy MMoodduullee
RReeffeerreennccee MMaannuuaal
l
Revision: December 14, 2007
Note: This document applies to REV D-E of the board.
215 E Main Suite D | Pullman, WA 99163
(509) 334 6306 Voice and Fax
LCD
DISPLAY
ATmega48
DAISY-
CHAIN
8 3
JI
SPI/
ISP
J2
TWI/
UART
TWI
7.3728MHz
Crystal
DATA
CTL
5V
BOOST
REGULATOR
4K Flash
(Internal)
256 EEPROM
(Internal)
512 SRAM
(Internal)
Internal
Oscillator
UART, SPI,
&TWI ports
4
4
2
Overview
The PmodCLS module can be used to display
important information during program
development or as a user interface after the
project has been completed. The module is
ideally suited for projects that include a Digilent
embedded-AVR board, but can also be used in
projects using a Digilent FPGA board.
The module is capable of executing a variety of
instructions, such as erasing specific
characters, setting different display modes,
scrolling, and displaying user-defined
characters. These instructions are specified
using escape sequences to send commands to
the board’s embedded Atmel ATmega48
microcontroller. The display on the module is
driven by this AVR and controls all of the
features of the board.
Functional Description
Communication with the embedded AVR on
the PmodCLS is established using a UART,
SPI, or TWI (Phillips I²C compatible) serial
connection. Characters are written to the
display simply by sending characters over the
communication link. The characters appear on
the display at the current location of the
board’s cursor.
You set the cursor location, and send other
instructions, by sending escape sequences. An
escape sequence is specified by first sending
the escape character followed by a left square
bracket ‘[‘, zero or more numeric parameters
separated by semicolons ‘;’ followed by the
command character for the specific command..
All of the possible instructions are listed in the
”Instruction Set” section, below.
PmodCLS Block Diagram
Communication Options
You can set the board’s communication
method by setting the mode jumpers MD0,
MD1, and MD2 on the board. Possible mode
jumper configurations are listed in the table
below. For Rev D boards, a missing jumper is
represented by 0 and a connected jumper is
represented by 1. For Rev E boards, a missing
Doc: 502-092 page 1 of 4
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
set cursor position to
<row>,<col>
restore saved cursor
position
clear display and home
cursor
erase within line
0 = current position to
end of line
1 = start of line to
current position
2 = entire line
erase field in current line
<ps> = number of chars
starting at current
position
scroll right <pn>
columns
reset; equivalent to
cycling power of
PmodCLS
set display mode
0 = wrap line at 16
characters
1 = wrap line at 40
characters
set cursor mode
0 = cursor off
1 = cursor on, blink off
2 = cursor on, blink on
save TWI address in
EEPROM to <pn>
save baud rate value in
EEPROM to <pn>
program character table
into LCD
save RAM character
table to EEPROM
load EEPROM
character table to RAM
define user
programmable character
save communication
mode to EEPROM
jumper is represented by 1 and a connected
jumper is represented by 0.
Connector J1 is used for SPI communication.
Connector J2 can either be used for UART or
TWI communication. Connectors J4 and J5
can be used to daisy chain other TWI devices.
Power Supply Options
The module is rated for external power ranging
from 2.7 to 5.5 volts DC. Using voltage outside
this range could damage the PmodCLS and
connected devices. The PmodCLS can be
powered through the board’s 6-pin headers J1
or J2, or through connectors J6 or J7.
When the module is connected to another
Digilent microcontroller or FPGA board, that
board can power the PmodCLS through a
Pmod connector. The host board should be
jumpered to provide 3.3V on the VCC pin of
the connector being used. The module is then
powered by the host board’s power supply.
Instruction Set
The PmodCLS is capable of executing many
different instructions. Instructions are sent
using escape sequences. An escape sequence
begins with the ESC character (character code
0x1B or decimal 27), followed by the left
square bracket ‘[‘ , followed by 0 or more
parameters separated by semicolons ‘;’ and
ending with the command character.
Command characters are case sensitive.
www.digilentinc.com page 2 of 4
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.