20x4 LCD Driver?

MicroSprynter

Joined Jan 16, 2012
11
Ok, so I am building an electronic product which uses an alphanumeric LCD to display the data. The LCD (as said in the title), is 20x4. I am sending the information to the LCD using a PICAXE chip (which will hold the logic for the product). This means that I cannot use my current driver (which is 16x2). My question is... How can I drive the LCD using the serout command on the picaxe? Is there a good and easy to use driver which I can connect between the LCD and the PICAXE chip?
This is the LCD I bought:

http://www.rapidonline.com/Electronic-Components/20-x-4-Alphanumeric-LCD-Displays-500164

MrChips

Joined Oct 2, 2009
19,742
Usually, the 20x4 LCD uses the same controller as the 16x2 LCD.
The driver remains the same.

MicroSprynter

Joined Jan 16, 2012
11
Thanks so much. I have got a driver for a 16x2 LCD, so I test that out... Thanks for the quick reply btw.

ErnieM

Joined Apr 24, 2011
8,009
The main difference between different size displays is where in the memory each line is stored. I'm currently using a 20x4 display and the lines start here:

Rich (BB code):
#define LINE_1        0x80            // home first line
#define LINE_2        0xC0            // home second line
#define LINE_3        0x94            // home third line
#define LINE_4        0xD4            // home fourth line
Yours should do the same, so use those numbers for the starting address when writing to those display lines.

DO NOTE they are not in the order one would expect, so when you wrap around the first line it appears on the third line, then 2nd line, and finally the 4th line. (I see that when debugging and I've written too much at one time.)

t06afre

Joined May 11, 2009
5,934
The main difference between different size displays is where in the memory each line is stored. I'm currently using a 20x4 display and the lines start here:

Rich (BB code):
#define LINE_1        0x80            // home first line
#define LINE_2        0xC0            // home second line
#define LINE_3        0x94            // home third line
#define LINE_4        0xD4            // home fourth line
Yours should do the same, so use those numbers for the starting address when writing to those display lines.

DO NOTE they are not in the order one would expect, so when you wrap around the first line it appears on the third line, then 2nd line, and finally the 4th line. (I see that when debugging and I've written too much at one time.)
Those numbers are kind of wrong I think. But they will be correct if used as goto commands(RS=0). As the goto command(Set DDRAM Address) is DDRAM cell address+0x80.

MicroSprynter

Joined Jan 16, 2012
11
Thanks for all the help. I am completely new to BASIC, and so I am having to learn the very basics for this project. Would you mind writing a very simple program so I can see how to use these commands and definitions. For example:
Print "Hello" on the first line, and then print "World" on the second line. That would help me out a lot, and make this whole process easier for me. Thanks again.

t06afre

Joined May 11, 2009
5,934
Thanks for all the help. I am completely new to BASIC, and so I am having to learn the very basics for this project. Would you mind writing a very simple program so I can see how to use these commands and definitions. For example:
Print "Hello" on the first line, and then print "World" on the second line. That would help me out a lot, and make this whole process easier for me. Thanks again.
Have you looked at the manual here around page 38
http://www.picaxe.com/docs/picaxe_manual3.pdf

MicroSprynter

Joined Jan 16, 2012
11
Thanks a lot... I must have just looked straight past that.

MicroSprynter

Joined Jan 16, 2012
11
Ok, so I have tried the LCD driver with no luck... I have tried programming it with PIC Logicator (using the flowcharts), and also in BASIC. I'm really confused... I think I might try one more driver. Can any of you point me in the right direction, or tell me a particular one I should try. Thanks...

ErnieM

Joined Apr 24, 2011
8,009
Well... poop! The link on that page to the data sheet is dead. Can you attach that pdf itself so we can have a look?

One thing commonly done with serial interfaces (meaning I've done it too) is the transmit on one end goes to the receive on the other, not transmit to transmit.