DJB-LCD Modular Display Project

This project is a continuation of my PSIM display effort.  I decided to build the display in a small modular enclosure so I could move it for easy viewing. Interfacing to the VFD display at 9600 baud had limitations since I only had software UART capabilities at this baud rate.  The VFD display also required 400 mA of +5 volts which is a lot of power.  I also was able to find a 2X20 LCD display from Optrex which uses the Hitachi HD44780U controller.

I decided to use an Atmel AVR microcontroller to interface this display.  I already purchased the STK500 development kit to program my AVR synth. It came with a spare ATMEGA16 so I decided to use it.  The Optrex display only supports 4 or 8 bit parallel communication.  I used the AVR microcontroller for MIDI and serial input as well as supporting three different communications modes.

The PSIM MIDI interface is supported in hardware with interrupts. Other outputs implement a software UART which requires interrupts to be disabled.  The baud rate needs to be at least 38,400 to not miss MIDI input interrupts.  I chose to set the serial input rate at 57,600 baud.  I drive this display from either the Aux output or the RS-232 program connector with a patch cord that connects a 2K resistor between pin 2 (s_out) and pin 5 (gnd) to provide the appropriate ground reference .

Here is a photo of my development environment using the STK500.  I am using a modular power supply for development but I have +5 power available on the rear of my modular synthesizer that I will use for this module.


Here is a close up of the STK500 development board with the ATMEGA16 microcontroller.


I am running the ATMEGA16 at 8 MHz.  I am only using two 8 bit ports so I could implement this in a smaller part such as the ATMEGA8.  Features currently implemented are:


  1. Power (+5 volts)

  2. MIDI input and MIDI thru

  3. Serial input (+5 volt 1/4" input compatible with my MIDI bass pedals and PSIM)


  1. Power switch and LED

  2. Input select switch
        57,600 serial

  3. Three position mode switch
         Scrolling character mode (scrolls in from lower right)
         Overwrite character mode
         Scrolling hexadecimal mode (scrolls in from lower right)

I can really use the MIDI hexadecimal display to validate all of the various MIDI software that I have written for my Bass Pedals, Kurzweil Expressionmate controller, and the PSIM.

Below is a photo of the character mode.  The LCD panel is backlit at 25 mA.  The extra holes are to mount the display.  The top left switch is mode and below it is the input select. The power switch is below the LED.


Below is a photo of the scrolling hexadecimal mode.  The small 'x' in the lower right corner indicates hex mode.  I've since replaced this with a small hx I made with the programmable character cells.



I built a small  board to fit below the display.  There is very little room inside this module. Below is a photo of rear wiring of the controller board.  I soldered wire-wrap wire to make all the connections.  The construction is very tight.


Below is a photo of the controller board mounted in the enclosure.  The 14 pin ribbon cable connects the 8 data, 3 control, and 2 power signals to the controller.  The back-lit connection is a separate cable at the opposite end of the display.  The power LED is mounted below the 1/4" signal jack.  This input supports 57,600 serial data.  I used a darlington transistor on the input to be compatible with the low current capability of the PSIM Aux output.

The two conductor zip cable is +5 volts which connects to my top synthesizer cabinet.  My cabinets have +5 or +/-15 volt fused outputs on the rear.  The 5 pin DIN connector on the left is MIDI input and the similar connector on the right is MIDI thru.  The small 2x3 square pins are for in-system-programming of the AVR.

DJB-LCD display schematic



Below is a photo of the completed module that can be located anywhere within easy reach of the synthesizer.  Here it is connected to my Midi bass pedals showing each note that is played.