DisplayHub

(updated: 2009-07-16)

Purpose: The original purpose of the DisplayHub project was to have a small screen that sits on your destop, near your computer, that would display important messages you might otherwise not see because your monitor is KVM switched to another PC, or the PC's screen saver is active. It would have been similar to the MessageMinder and DisplayBuddy projects. It was discovered that the rate to draw the screen of the chosen TFT screen was too slow to be effective. Nevertheless, the DisplayHub project still turned out to be a usefull platform to show how to use the DLP Designs DLP-232PC to drive a TFT screen.

Overview

The DLP-232PC is a module made by DLP Designs that provides an interface to digital & analog I/O by marrying an FTDI USB interface chip with a Microchip PIC microcontroller. The microcontroller contains firmware that includes a command interface for setting the I/O pins to be digital inputs, digital outputs, or analog inputs. When plugged into a PC's USB port, the interface is a vitual COM port.

The I/O of the module are connected to a Tianma TM240320C1NFWGWC TFT color display (2.4", 320x240). It includes the Ilitek ILI9325 LCD controller. The module is set for its 8-bit hardware interface. The control interface is a simple i80 interface, using 8 data lines, /RD, /WR, /CS, and a line for Register Select.

The schematic:

*******

Since the DLP-232PC operates at 5V and the module's max operating voltage is 3.3V (2.8V is being used here), level translators are needed.

The software that controls the DLP-232PC's I/O lines is provided in a C# application. The code originally came from the DisplayBuddy project, so remnants of that code can still be seen. The interface for Microsoft Outlook and the message service have been disabled (since further development of the DisplayHub project was concluded after it was seen how slow the screen updated).

The application opens the COM port associated with the DLP-232PC, sends commands to do a hard reset of the display, and then waits. By right-clicking the icon in the Windows task tray, and selecting "Test", you have access to test several functions.

*******screencapture

Of course the first item to select should always be "turnOn". The "text" test will display "Hello". The "picture" test will display a picture. It was observed that a 320x240 picture took many minutes to load. Each vertical line (340 pixels) took ~5sec to be drawn on the TFT display. The delay (Thread.sleep()) calls were adjusted to the lowest values while still allowing the display to operate correctly. We also do not send each byte one at a time. Rather, when possible, a group of bytes is buffered and then sent so that as the bytes are received by the PIC microcontroller, the I/O is set with that same sequence.

Source Code Overview

Display.cs - low level bit banging and register & data read/write functions.

DisplayGOLFont.cs - font bitmaps with glyph table

DisplayG.cs - test functions to show text and a bitmap

Features:

- DLP-232PC

- TFT color screen

- C# with .NET

- Uses the .NET SerialPort class.

- Sample interface code for the ILI9325 LCD controller.

- Easily loades a bitmap using .NET's System.Drawing.Bitmap class

- Uses the Gentium bitmap font (found in the Microchip Graphics Library, GOLFontDefault.c) to draw text.

Downloads (see the attachments section below)

DisplayHub20090716R.zip - Visual Studio 2008 Express Edition, C# project

Terms of Use

Home

Copyright Steven R. Nickels 2009. All rights reserved.