Home

The LCD Project

Project Description

The point of this project is to let the PICAXE 08M communicate with an LCD. To use the 08M you need to have a serial LCD controller kit running a slow baud. Anderson provides the 118 Serial LCD Controller kit, which uses a resonator and runs at 2400 baud.

In this project I used the Wulfden K107 kit, which is the Anderson 118 with a number of headers for attachment to various LCDs. This attaches directly to my Anderson "Half-board" using its V+, ground and a data port. The programming side is very simple - sending a few control commands and data on port using the SEROUT command. If you get the Wulfden kit make sure it contains the 118 serial LCD controller for 2400 baud so that it will work with your PICAXE. You can also get kits from PH Anderson.

Project Hardware Setup

I left the breadboard just as it was for Pete's project when I used the headphone jack. The only addition to the board is three pin header that is feeding the three wire cable to the serial controller. The black wire is ground, the red is 5v and the white is data. You can see that the data pin of the header is connected to port 4 of the Anderson "Half-board". Note: all the stuff on the left of the board was just put there to get it out of the way. It's not part of the project.

lcdSetup.jpg

The K107 is the PC board just below the breadboard. Yeah, it's upside down. The chip on it is the Anderson 118 Serial LCD Controller. The board is originally set up to run 9600 baud, but has two traces to cut and two solder point to bridge so that it can run at 2400 baud. This eliminates the chip's onboard resonator and uses the external resonator, which is the orange component at the top left of the chip in the picture. I have a 2x7 header on the K107 since that is what the LCD requires. You could also use a 1x16 header if that's what your LCD needs.

As you can see Pete's program is running and is putting out my message, as well as tone and blinking light. The reason my call has lost its "N" is that the program starts sending its morse code before the LCD has finished initializing. On the second and subsequent iterations the whole message is there.

Project Software

The software for this project is very simple. So I will just show the code that I added to Pete's SendMorse project. This outputs the character being sent to the LCD. As you can see I changed the message. I had to steal some bytes from it so the max is on 47 now. I used those 12 bytes to add the two lines of code to the main routine. The first line is control commands for the LCD. The second is the character being sent.

data     ("N3III Richs Mod to Petes code ")  ' message to send in Morse.

symbol msglen = 30				' number of characters in message to send 


main:

  wait 5						' wait 5 seconds 
'RM mod 
  serout 4, T2400, ("?f?a")			' clear the screen reset cursor
  for charcount = 1 to msglen			' get character
    charptr = msgptr + charcount - 1 	' determine address of character in data memory
    read charptr, ascii 			' put character into ascii variable

'RM mod 
    serout 4, T2400, (ascii)		' send character to the LCD
    if ascii >= 97 and ascii <= 122 then