Products for USB Sensing and Control

Products for USB Sensing and Control

PHIDGETS Inc.

Unit 1 - 6115 4 St SE
Calgary AB  T2H 2H9
Canada
+1 403 282-7335

PhidgetTextLCD Adapter

ID: 1204_0

A dual channel LCD controller that is compatible with HD44780 LCD modules.

$65.00

Quantity Available: 542

Qty Price
5 $61.75
10 $58.50
25 $52.00
50 $45.50
100 $42.25
250 $39.00
500 $35.75
1000 $32.50

The PhidgetTextLCD Adapter lets you connect one or two HD44780 LCD modules. The adapter can handle up to 4 lines of 40 characters, depending on the LCD module you are using. You can separately adjust the backlight and the character contrast of each LCD module.

The 1204 API supports the following screen sizes (lines x characters):

  • 1x8, 2x8
  • 1x16, 2x16 4x16
  • 2x20, 4x20
  • 2x24
  • 1x40, 2x40, 4x40

Comes Packaged with

Product Specifications

Electrical Properties
Current Consumption Max 500 mA
Current Consumption Min 34 mA
Current Consumption Max (1x8 or 2x8 screen) 200 mA
Current Consumption Max (2x20 or 2x24 screen) 76.5 mA
Current Consumption Max (4x40 screen) 181 mA
Current Consumption Max (Backlight) 400 mA
Available External Voltage 5 V DC
USB Speed Full Speed
Board
Controlled By USB
Physical Properties
Operating Temperature Min 0 °C
Operating Temperature Max 70 °C

Software Objects

Channel NameAPIChannel
Text LCD LCD 0 - 1

API


Back Forward
Print this API

Documents

Library & Driver Downloads

Code Samples

APILanguageOS
LCD C Multiple Download
LCD C# Windows Download
LCD Java Multiple Download
LCD JavaScript Any Download
LCD Python Multiple Download
LCD Visual Basic .NET Windows Download

Product History

Date Board Revision Device Version Comment
August 2011 0 100 Product Release, requires phidget21 2.1.8+
August 2011 0 101 getLabelString fixed for labels longer than 7 characters

Getting Started

Welcome to the 1204 user guide! In order to get started, make sure you have the following hardware on hand:


Next, you will need to connect the pieces:

1204 0 Connecting the Hardware.jpg
  1. Connect the LCD screen to the adapter using the LCD cable.
  2. Connect the TextLCD adapter to the computer using a USB cable.


Now that you have everything together, let's start using the 1204!

Using the 1204

Phidget Control Panel

In order to demonstrate the functionality of the 1204, the Phidget Control Panel running on a Windows machine will be used.


The Phidget Control Panel is available for use on both macOS and Windows machines. If you would like to follow along, first take a look at the getting started guide for your operating system:


Linux users can follow the getting started with Linux guide and continue reading here for more information about the 1204.

First Look

After plugging the 1204 into your computer and opening the Phidget Control Panel, you will see something like this:

1204 Panel.jpg


The Phidget Control Panel will list all connected Phidgets and associated objects, as well as the following information:

  • Serial number: allows you to differentiate between similar Phidgets.
  • Channel: allows you to differentiate between similar objects on a Phidget.
  • Version number: corresponds to the firmware version your Phidget is running. If your Phidget is listed in red, your firmware is out of date. Update the firmware by double-clicking the entry.


The Phidget Control Panel can also be used to test your device. Double-clicking on an object will open an example.

Text LCD

Double-click on the LCD object, labelled Text LCD, in order to run the example:

1204 TextLCD Example.jpg


General information about the selected object will be displayed at the top of the window. You can also experiment with the following functionality:

  • Select a screen size that suits your LCD screen with the Screen Size drop-down menu.
  • Write in the Display text text boxes, your input will be mirrored on the LCD screen.
  • Drag the Contrast and Brightness sliders to a level where you can clearly see the text on the screen.
  • Toggle the Cursor and Cursor Blink checkbox to view the current cursor position on the LCD screen.
  • Toggle Custom Characters to show an example of the 1204 using bitmaps.
  • Use the Clear button to clear the screen.


Technical Details

Introduction

Liquid Crystal Displays are display devices used to convey information through arrangements of pixels. Graphic and Text LCDs are the most common types available for electronic products. The 1204 supports the following screen sizes (lines x characters): 1x8, 2x8, 1x16, 2x16, 4x16, 2x20, 4x20, 2x24, 1x40, 2x40, 4x40. Please note that your program has no way of automatically detecting the size of the attached screen, so you need to set the screen size with call from Phidget22 API in order to have text strings display properly.

Connector

Below is a pinout diagram for the connector on the 1204, with descriptions of each pin. Remember to use the end of the cable with the larger connector with the 1204 if you want the wire colors to be consistent with the diagram.

1204-pinout.jpg
Pin Description
A LED Anode (+)
K LED Cathode (-)
VSS Board Ground
VDD Supply Voltage (5V)
VO LCD Operating Voltage
RS Register Selector
R/W Read/Write Signal
DB0-DB7 Data Bus Lines

Text LCDs

Lcd display.png


Text LCDs display full text strings set in software. Since text characters are defined from the ASCII standard library, other ASCII standard set characters and glyphs can also be sent to the text LCD. This can be done easily by using unicode characters within your text string. In C#, this may look something like this:

tLCD.WriteText(LCDFont.Dimensions_5x8, 0, 0, "Apple starts with \u0041");

The four parameters of the WriteText method are as follows:

  • The font type, which will always be the one above for the 1204 because it's the only font it supports
  • The horizontal position of the text within the line
  • The vertical position of the text (which line)
  • The text to be printed

In this example, the string \u indicates that a unicode character follows, and the unicode character 0041 represents the capital letter A (you can also reference it with '\x41', which is the same character in hexadecimal). After the LCD converts the unicode character, the above example would cause the LCD screen to read Apple starts with A. A chart of all ASCII standard set character codes is available here.

Custom Characters

Custom characters can also be generated for the 1204. A custom character can be any arrangement of pixels within the space allotted for a single character. Single characters are made up of pixels arranged in a grid 5 pixels wide by 8 pixels high. Once generated, custom characters can be stored in any one of eight volatile memory locations on the PhidgetTextLCD, and can be recalled with a simple API command from software. Custom characters are designed by creating a byte array of ones and zeroes, like this:

	Byte[] heart = new Byte[] {
		0,0,0,0,0,
		0,1,0,1,0,
		1,1,1,1,1,
		1,1,1,1,1,
		0,1,1,1,0,
		0,0,1,0,0,
		0,0,0,0,0,
		0,0,0,0,0 };

The above bitmap creates a character that looks like a heart. In order to use this bitmap on your screen, you have to assign it to a memory location and use it in a WriteText call.

	tLcd.SetCharacterBitmap(LCDFont.Dimensions_5x8, "\x1", heart);
	tLcd.WriteText(LCDFont.Dimensions_5x8, 0, 0, "Heart: \x1");

The above code causes the string Heart: ♥ to display on the screen. You can store up to eight characters at the same time; one character in each of the locations \x1 to \x8. If you set a character to location \x9, it will be the same as setting \x1. Likewise, \xA will set \x2, and so on for \xB, \xC, etc.

What to do Next

  • Software Overview - Find your preferred programming language here to learn how to write your own code with Phidgets!
  • General Phidget Programming - Read this general guide to the various aspects of programming with Phidgets. Learn how to log data into a spreadsheet, use Phidgets over the network, and much more.
  • Phidget22 API - The API is a universal library of all functions and definitions for programming with Phidgets. Just select your language and device and it'll give you a complete list of all properties, methods, events, and enumerations that are at your disposal.

LCD Screens

This adapter can interface up to two text LCD screens. Each screen comes packaged with the cable required to connect it to the PhidgetTextLCD Adapter. Note that the 4x40 screen requires both ports on the TextLCD, so you can only interface one screen of this size.

Product LCD Screen
Image Part Number Price Number of Rows Characters per Row Character Width
3650_0 $18.00 2 20 3.2 mm
3651_0 $14.00 2 20 2.5 mm
3652_0 $25.00 2 20 5.9 mm
3653_0 $25.00 2 40 3.2 mm
3654_0 $20.00 4 20 3 mm
3655_0 $35.00 4 40 2.8 mm

Replacement LCD Cables:

Each LCD screen we sell comes with the appropriate cable, but if you need a replacement or need to wire up a custom screen, you can find the extra cables in the table below:

Product Physical Properties
Image Part Number Price Connector A Connector B Cable Length Cable Gauge
3014_0 $3.50 2x10 Connector 2x8 Connector 300 mm 26 AWG
3026_0 $3.50 2x10 Connector 1x16 Connector 300 mm 26 AWG
3027_0 $3.50 2x10 Connector (x2) 2x9 Connector 300 mm 26 AWG

Enclosures

You can protect your board from dust and debris by purchasing an enclosure. An enclosure will also prevent unintentional shorts caused by objects touching the pins on the bottom of the board or any terminal screws.

Product Physical Properties
Image Part Number Price Material
3819_1 $8.00 Clear Acrylic

USB Cables

Use a USB cable to connect this Phidget to your computer. We have a number of different lengths available, although the maximum length of a USB cable is 5 meters due to limitations in the timing protocol. For longer distances, we recommend that you use a Single Board Computer to control the Phidget remotely.

Product Physical Properties
Image Part Number Price Connector A Connector B Cable Length
3017_1 $3.00 USB Type A USB Mini-B 280 mm
3018_0 $5.00 USB Type A USB Mini-B 1.8 m
3020_0 $12.00 USB Type A USB Mini-B 4.5 m
3036_0 $3.50 USB Type A USB Mini-B 600 mm
3037_0 $4.00 USB Type A USB Mini-B 1.2 m

Here are the options for LCD display besides using the 1204:

Product Board
Image Part Number Price Controlled By
1203_2 $125.00 USB