Maker Pro
Maker Pro

Advice on LCD display for Picaxe project.

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Hello friends and have a nice day,

I want to practice interfacing picaxe with LCD dispay i have never done that before and i guess it will not be easy for me.
Can anyone suggest me what display i should use ?

Picaxe manual has info on 16x2 AXE033 SERIAL/I2C LCD.
http://www.picaxe.com/docs/axe033.pdf

I have searched e-bay and found other that look the same to me, like this one :
http://www.ebay.com/itm/IIC-I2C-TWI...065847?hash=item484f1ed477:g:YCcAAOSwdzVXkGt7

Description says it is ( IIC/I2C/TWI/SPI Serial Interface1602 16X2 Character LCD Module Display Blue )

Would it work ? Any suggestions ?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
From an eletrical point of view it should be easy as pie to connect this LCD to your picaxe.
The question is: will you be able to control it? Every controller has specific commands to control the various functions. You'll need a library suitable for the controller on this LCD - or write your own, it's no wizardry.

Unfortunately the type of controller for this board is not mentioned on the ebay page, so there is no (at least no easy) way to tell what it will take to get the LCD up and running on your picaxe.
As the photo shows this LCD connected to an arduino and this cooperation is also mentioned in the text, chances are that youll be able to find an arduino library which you can adapt for the picaxe. Or maybe even a pic library. You'l know only after you have the module in your hands and can identiy the controller.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
The PCF8574J is a port expander, not an LCD controller. This type of chip gives you additional parallel I/O ports from a serial interface. This chip is used on the LCD to interface the parallel I/O of the LCD controller to a serial port (I²C,...).
At least the LCD you mention in post #4 comes with test code and examples in C++ to download. You may be able to adapt this code to your platform.

These 2 line LCDs are pretty standard (probably only a few more or less compatible controllers), so it shouldm't be too much of an issue to find other suitable code once you know which controller is on board. For $ 2.45 you can't do much wrong. Buy one or two and start experimenting.

Does this video help?
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
At least the LCD you mention in post #4 comes with test code and examples in C++ to download. You may be able to adapt this code to your platform.

These 2 line LCDs are pretty standard (probably only a few more or less compatible controllers), so it shouldm't be too much of an issue to find other suitable code once you know which controller is on board. For $ 2.45 you can't do much wrong. Buy one or two and start experimenting.


I have ordered it today. In the end i may just waste 2.5$ big deal.

It is just that i nkow nothing about programming. I have recently statred reading the picaxe code which is very similar to basic. I do remember a few basic commands from highschool like goto, if then, but that's about it.

Sadlercomfort has helped me alot with picaxe programming. I will try though.

P.S. Any help is most welcomed :)

Thank you Harald.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
Sadlercomfort has helped me alot with picaxe programming. I will try though.
Once you have the LCD and know the type of controller, feel free to PM sadlercomfort. He seems to be a genial guy.

It is just that i nkow nothing about programming. I have recently statred reading the picaxe code which is very similar to basic. I do remember a few basic commands from highschool like goto, if then, but that's about it.
An LCD in that case is probably not the best way to get you started. The "hello world" equivalent of microcontroller programming is gettin an LED to blink.
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Once you have the LCD and know the type of controller,
I doubt that even then i will knwo. As shown in picture, U1 and U2 have no identificetion of any kind. E-bay seller has no idea what chip is used o_O...
http://www.ebay.com/itm/IIC-I2C-TWI...f34265&pid=100005&rk=3&rkt=18&sd=310565065933

An LCD in that case is probably not the best way to get you started. The "hello world" equivalent of microcontroller programming is gettin an LED to blink.

a couple of months ago i wrote a small program (with Sadlercomfort providing guidelines) where by pressing buttons a motor would start and stop at a frequency depending on the button pressed. It even had an interrupt with a sound play.

Still i know nothing more than switching a led on and off and a little serin and serout.

By the way for now i only want the LCD display to enhance my GPS project.
 
Last edited:

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
One thing that confuses me a little is that on the video the parallax lcd uses 1 rx data wire and one gnd while the e-bay one uses 2 (sda , scl).

The video is really nice but i doubt a simple serout command will work on the e-bay LCD.
 
Last edited:

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
You can control it from the PICAXE. II2 is a synchronous protocol, you don't need any special hardware to implement it, though the PIC chip does have it and PICAXE probably supports it with library functions.

Bob
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
I took a quick look at the PICAXE manual. It looks like it has support for either parallel LCD's or serial (meaning RS232 type serial) not IIC. So you will have to roll your own for use with IIC. I think you can find LCDs that use RS232 type serial interfaces, which might be a lot simpler to use with PICAXE. I say RS232 because I mean the ansynchronous serial used in serial communications. The signal levels will probably not be RS232, but TTL level, which will interface directly with the PICAXE serial out pin.

Bob
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
What he say in the video i so simple but what picaxe datasheet says i do not understand at
Page 31 of the below pdf
all.http://www.picaxe.com/docs/picaxe_manual3.pdf
This is humorous. When reading that PDF there's a large note that states "For full datasheet please see www.picaxe.com/docs/axe003.pdf". Which is exactly the document your reading! :) I guess that could be handy when a year later you're wondering where you downloaded it from. :D

Anyway, starting on page 31 of the Interfacing Circuits (PDF3), which you've mentioned they cover LCD's. Reading further it states the following.
There are three main ways of interfacing LCDs to microcontrollers.
1) Serial LCD firmware chip
2) Serial LCD Module with onboard firmware chip
3) Direct Connection
Picaxe chips are PICs so there should be no difference interfacing it than any other PIC. Hardware doesn't really change when using a Picaxe vs a blank PIC ....just the much simpler code. ;)

Chris
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I forgot to post this. It's found on page 36 which discribes direct parallel connection from the Picaxe to the LCD. Serial isn't used for this connection.
Code:
EEPROM 0,(“Hellothere!”) ‘ store the text in the EEPROM memory
gosub init ‘ initialise LCD
main: let b1 = 1 ‘ set b1 to ‘clear display’ instruction
gosub wrins ‘ send instruction to LCD
for b3 = 0 to 4 ‘ setup for...next loop (“Hello” - positions 0 to 4)
read b3, b1 ‘ read letter from EEPROM into variable b1
gosub wrchr ‘ send character to LCD
next b3 ‘ next loop
let b1 = 192 ‘ set b1 to ‘start of second line’ position
gosub wrins ‘ send instruction to LCD
for b3 = 5 to 11 ‘ setup for...next loop (“there!”-positions 5 to 11)
read b3, b1 ‘ read letter from EEPROM memory into variable b1
gosub wrchr ‘ send character to LCD
next b3 ‘ next loop
As you can see there's much more code than when using the Axe003 which uses the Serial library and is much easier to use.

Chris
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
t looks like it has support for either parallel LCD's or serial (meaning RS232 type serial) not IIC. So you will have to roll your own for use with IIC.
How about I2C ?

As you can see there's much more code than when using the Axe003 which uses the Serial library and is much easier to use.
That is right.
So from what i understand so far, there is no way to use this LCD just like i would an Axe033. So simple serout command is something i have to forget about huh ?
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
That is correct. If you want to use that code, you need to get an LCD display with RS232-like serial, as I explained before.

Bob
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
How about I2C ?


That is right.
So from what i understand so far, there is no way to use this LCD just like i would an Axe033. So simple serout command is something i have to forget about huh ?
The only other option I found is this Firmware, which is a PIC that either Rev Education programmed or (very doubtful) is available elsewhere. I didn't read the complete description of the AXE003 but my guess it's an LCD and this PIC (Firmware) packaged as a module.
http://www.picaxe.com/docs/frm010.pdf

Chris
 

HellasTechn

Apr 14, 2013
1,579
Joined
Apr 14, 2013
Messages
1,579
Got that. Thank you Bob and Chris.

I didn't read the complete description of the AXE003 but my guess it's an LCD and this PIC (Firmware) packaged as a module.

That is exactly what it is. Though in some other version instead of a firmware chip they use a Picaxe 18M2 with some code to interface between LCD and the Microcontroller.

The way i see it now is either to buy a firmware chip or to use a second Picaxe as i mentioned before.
I will check the availability and cost of the firmware chip and think about it.

P.S.
http://www.picaxe.com/downloads/axe133.bas.txt
Here is the code for the 18M2 to act as slave interface. I guess i could adjust it for use with the 20M2 Picaxe i already have. Then connect it with the chineese LCD i bought from e-bay. I will wire it as shown in page 5 of this PDF.
http://www.picaxe.com/docs/axe133.pdf
 
Last edited:
Top