Projects

Two Line Mini-Terminal
Six Digit LED Clock Display
SPI to LCD
Digital Thermometer
Software for the DS1302 Real Time Clock
Software for the DS1307 I2C Real Time Clock
USB for the MC9S12DP256
Project Board for MC9S08QG8 and MC9S08QE8
Project Board for MC9S08SH8
Low Power Wireless Temperature Sensor
Time, Temperature and Relative Humidity Project
40 Keyswitch Membrane Keypad Interface
IIC to LCD Software


Two Line Mini-Terminal

The Two Line Mini-Terminal is a embedded microcontroller board designed to implement a limited but low cost terminal. The board was designed to be the same size as a 2 line by 40 character LCD such as the OPTREX DMC 40218. With mounting holes in the same pattern as the LCD the controller board can be piggy backed with the display. As an input device the terminal uses standard IBM compatible PC keyboard. In a normal full duplex mode the controller converts the keyboard scan codes to ASCII and transmits them to the RS-232 output. Input from the RS-232 is displayed on the LCD. The software does vertical and horizontal scrolling of the incoming characters.

AT Keyboard PCB LCD

Acrobat (GIF) To view a PDF version of the manual click here (140 K; July 97 version).
Download the code. Ordering information.


  • For more information check Fil's FAQ on LCD's and on AT keyboards.
  • Or this FAQ on keyboards that I copied from somewhere.
  • Craig Peacock has a very well done tutorial on the AT keyboards including a project similar to this one using a HC05
  • Cloud-9 sells a AT keyboard interface to the old RS Color Computer.
  • QWERTYX sells a AT Keyboard and Mouse Interface combined for Atari Computers
  • Similar project using a Z80
  • Motorola has an Application Note, AN1723, that describes interfacing MC68HC05 Microcontroller based devices to the IBM Keyboard interface.
  • My keyboard subroutine is an enhanced and expanded conversion of that found in the Philips AN434 app note.
  • The Two-Line Mini Terminal has space on the PC board for a potentiometer to adjust the contrast level but you may want to read "Firmware-Adjustable LCD Bias Generator Swings Outside the Rails" in the April 5, 1999 issue of ELECTRONIC DESIGN for some ideas on ways to adjust the contrast by software control.

 


Please be patient while the LEDSign loads...
If you were using a Java-enabled browser, you would see an animated scrolling text sign that looks like this:


This is just a Java app but check out a real LED Dot Matrix display project.


Six Digit LED Clock Display

It's difficult to get a good photograph of LEDs.
The display is much brighter then it appears in this photo.

CLOCK

The board is driven by a Maxim MAX7219 which has a serial interface; it can be controlled by a any microcomputer with a SPI or three output lines. The board is 2.75 inches by 6.5 inches in size; mounting four .8 inch LED displays and two .56 inch displays as well as six individual LEDs, a 7805, the MAX7219, and a five pin header.

A LED display circuit is straightforward but wirewrapping one is a long tedious job; save time and effort by ordering a printed circuit board.

Acrobat (GIF) To view a PDF version of the schematic and parts placement click here (161 K; July 98 version).

Randy has some C code for the chip on his site.
If you use the Basic Stamp read MAX7219-21 8-Digit LED Display Driver.pdf and get the source.

I am currently running the clock with a MC68HC811E2 using a software clock. It features an alarm with snooze, beep on quarter hour, dim at night and a TALKER so that I can communicate with it using PCBUG. Download the source code.


SPI to LCD

Click for larger view Click for larger view Click for larger view
Click for larger view Click for larger view Click for larger view
If you want to interface a LCD to your project but are short the number of I/O pins required, you could use the Motorola SPI and an inexpensive 74HC595 shift register. A printed circuit board with the IC, a SIP connector, space for a dropping resistor if the LCD has a LED backlight and an optional pot to adjust contrast is less than 1 x 2 inches in size. In the photo top left the contrast input was hardwired to GND. In the photos in the lower row trim pot as well as the power for the LED backlight is installed.  The LCD is interfaced in the 4-bit mode with first four bits of the HC595 connected to DB4-7 of the LCD and RS & E connected to output bits 4 & 5. All you need it make this work is a suitable subroutine.

Download code examples for the 68HC11 and 68HC12. Here's the schematic .

Most LCD's are interfaced via a 16 position header located along the top or bottom edge.  My pcb is designed to connect to such LCD's.  However, some LCD's use a 8x2 position header along the side.  I recently came across a board by Oleg Mazurov posted on BatchPCB for a SPI to a 8x2 type LCD.  You can buy one directly from them.

If a SPI interface doesn't work for you then consider a IIC interface.


Roger's Embedded Microcontrollers Home Page     Send me an email


This page written by Roger Schaefer. Last updated November 7, 2011
The LED Sign Java applet is written and Copyright 1995 by Darrick Brown.