picaxe to lcd display, not do-able

peter howarth

New Member
is there any circuit diagram and code listing available on the internet or revolution education website that makes interfacing between a picaxe device and any common lcd display successful , otherwise its not possible!!
 

lbenson

Senior Member
Third time for this question. Any reason the previous answers and links provided to you didn't work? What have you tried? It's not only possible, it's been done many times. Be specific about which module you tried or want to try.
 

J G

Active member
The manual 3 has a guide and example program. See the bottom of page 36 for the schematic, page 37 for an example program and page 40 for the subroutines used by this example program. It has been many years since I last used an lcd with a picaxe (generally the box with the lcd has been using different microcontroller for varying reasons not specifically related to the display), but from memory, once the subroutines and example are working, it is pretty easy to use and reliable to modify it to suit your needs.
 

AllyCat

Senior Member
Hi,
is there any circuit diagram and code listing available on the internet or revolution education website that makes interfacing between a picaxe device and any common lcd display successful , otherwise its not possible!!
Of course it's "possible", but the basic answer to your question is NO, because not all "common LCDs" are the same. Rather like asking "Is there a fuel that I can use in Any Car?". :( Specify what you have or plan to purchase (and preferably exactly what you want to do with it) and we may be able to help further.

Cheers, Alan.
 

inglewoodpete

Senior Member
is there any circuit diagram and code listing available on the internet or revolution education website that makes interfacing between a picaxe device and any common lcd display successful , otherwise its not possible!!
It would really help your cause if you settled on one thread rather than the ever increasing number of disassociated threads. Otherwise, forum members will either waste their time re-asking "which PICAXE?" and "what LCD module?" or ignore your plight.

The best approach to have success is to read the datasheet for your specific LCD, connect it to your chosen PICAXE using a tested method (On a couple of occasions, I have have provided you with the link to a thread of a project that I took the time to design, test and document). Why not follow it and, if it does not work, note the problem symptoms you are having, ask questions on the forum and get help? That is how this forum works: help us to help you.

If you can't follow these fairly simple guidelines, you will find that people will just ignore your posts.
 

erco

Senior Member
Sure, buy this old-school serial 16x2 LCD module (formerly plentiful & cheap, now rare & pricey) and you're off to the races.

Just send serial data at 4800 baud, 8-N-1, inverted (idle low). The baud rate and idle state CANNOT be changed.

Hurry, only one left! https://www.ebay.com/itm/173842408089

lcd.jpg
 

Goeytex

Senior Member
@Peter

Not impossible at all. Hundreds, if not thousands of folks use Picaxe Chips with LCD displays on a daily basis.

Arguably, these are the most commonly available types pf LCD displays. These include the common 16x 2 and 20 x 4 formats among others.

1) 8-Bit / 4-bit Parallel HD44780 (or clone) Controller
2) 8-Bit / 4-bit Parallel HD44780 (or clone) Controller with I2C Piggyback IC interface ( uses 4-bit Parallel + PCF8574 I2C/IO Expander))
3) 8-Bit Parallel interface with HD44780 (or clone) Controller with UART interface. (Includes AXE133Y/134Y)

Any of these WILL work and DO work with a properly selected Picaxe Chip and with the proper code. I will concentrate on #1, but to be very clear:

The easiest way to get an LCD up and running with a Picaxe is to buy an AXE0133Y or AXE134Y from Rev_Ed. Alternatively could get a cheap 16X2 or 20x4 Parallel only display and then add an AXE132 Driver Board to use the serial command set provided by Rev_Ed.

With 1) above, a minimum of 6 microcontroller pins are necessary for 4 Data lines and 2 control lines for RS and EN. IF you intend to READ the LCD module (most do not) then another Pin is needed for the RW line. Otherwise the RW pin on the LED module is shorted to ground so that the controller is always in the write state. IF the LCD has a backlight (most do) then another PIC I/0 pin is and an NPN Transistor are needed if you want the ability to turn the backlight on/off. Otherwise just hardwire it to always be on.

A "driver"or library is generally needed to allow user code to more easily write to the display. A driver/library initializes the display and creates commands for simplifying control. I do not think that Rev_Ed provides a Picaxe specific driver for these LCDs. As far as I know there are no actual libraries/ drivers for these. However several users here on the forum have written code that acts somewhat like a driver but with limited functionality. The code should be adequate to display messages as you indicated in another thread. Links to this code have been posted to many threads. So the code is available.

So I am baffled as why you have started yet another thread on this. It is not very productive to start a new thread on the same topic when you did not get the specific answers you wanted or expected in a prior thread. Asking the same questions over and over again without telling folks what you have actually done will probably not get you very far and folks may start ignoring your threads / posts. If you can't find a schematic or can't find the code then simply say so.

The folks trying to help you here are all volunteers who freely, (and usually happily) dedicate their time and effort to help others solve problems. But they are not mind readers and therefore might reasonably expect someone requesting help to provide the relevant information to make helping possible. This might include:

  • A clear and concise description of the issue or problem.
  • Which specific Picaxe model you are using or want to use
  • Which LCD device are you trying to use. Post a photo of it or a link to where it was purchased if you don't know,
  • Post any code that is not working. Folks need to see the code in order to provide help for stuff like syntax errors.
  • Post a complete diagram/schematic of your project. There is a lot of free software available for drawing schematics. So no excuses.
  • Post a clear close up photograph of your breadboard that shows all components and connections.
  • Steps you have taken to try to correct the issue or problem.
  • Be willing to do what is asked of you to resolve the issue. Then provide feedback after trying what is asked.
You asked a somewhat vague question.
is there any circuit diagram and code listing available on the internet or revolution education website that makes interfacing between a picaxe device and any common lcd display successful , otherwise its not possible!!
Answer: Yes and Yes. But you have already been given the answers in other threads.

Were you unable to find a diagram? Where you unable to find the code at the links previously provided?

Let me ask you a few other questions so that others may be able to give the specific help that you need.

  • What Picaxe chips do you actually have on hand? ( Hint: An 18M is not the same as an 18M2. so please be specific)
  • Do you have a breadboard for prototyping?
  • Do you have an LCD Display on hand? If so please describe it or provide a link to where it was purchased.
  • Do you have a Digital Multimeter, Logic Analyzer or Oscilloscope?
  • How would you rate your level of expertise with Picaxe/Microcontrollers in general

Answer these questions and folks will have a much better idea of how to proceed with helping you. Ignore these and getting appropriate help may not be so easy.

Goeytex
 

peter howarth

New Member
@Peter

Not impossible at all. Hundreds, if not thousands of folks use Picaxe Chips with LCD displays on a daily basis.

Arguably, these are the most commonly available types pf LCD displays. These include the common 16x 2 and 20 x 4 formats among others.

1) 8-Bit / 4-bit Parallel HD44780 (or clone) Controller
2) 8-Bit / 4-bit Parallel HD44780 (or clone) Controller with I2C Piggyback IC interface ( uses 4-bit Parallel + PCF8574 I2C/IO Expander))
3) 8-Bit Parallel interface with HD44780 (or clone) Controller with UART interface. (Includes AXE133Y/134Y)

Any of these WILL work and DO work with a properly selected Picaxe Chip and with the proper code. I will concentrate on #1, but to be very clear:

The easiest way to get an LCD up and running with a Picaxe is to buy an AXE0133Y or AXE134Y from Rev_Ed. Alternatively could get a cheap 16X2 or 20x4 Parallel only display and then add an AXE132 Driver Board to use the serial command set provided by Rev_Ed.

With 1) above, a minimum of 6 microcontroller pins are necessary for 4 Data lines and 2 control lines for RS and EN. IF you intend to READ the LCD module (most do not) then another Pin is needed for the RW line. Otherwise the RW pin on the LED module is shorted to ground so that the controller is always in the write state. IF the LCD has a backlight (most do) then another PIC I/0 pin is and an NPN Transistor are needed if you want the ability to turn the backlight on/off. Otherwise just hardwire it to always be on.

A "driver"or library is generally needed to allow user code to more easily write to the display. A driver/library initializes the display and creates commands for simplifying control. I do not think that Rev_Ed provides a Picaxe specific driver for these LCDs. As far as I know there are no actual libraries/ drivers for these. However several users here on the forum have written code that acts somewhat like a driver but with limited functionality. The code should be adequate to display messages as you indicated in another thread. Links to this code have been posted to many threads. So the code is available.

So I am baffled as why you have started yet another thread on this. It is not very productive to start a new thread on the same topic when you did not get the specific answers you wanted or expected in a prior thread. Asking the same questions over and over again without telling folks what you have actually done will probably not get you very far and folks may start ignoring your threads / posts. If you can't find a schematic or can't find the code then simply say so.

The folks trying to help you here are all volunteers who freely, (and usually happily) dedicate their time and effort to help others solve problems. But they are not mind readers and therefore might reasonably expect someone requesting help to provide the relevant information to make helping possible. This might include:

  • A clear and concise description of the issue or problem.
  • Which specific Picaxe model you are using or want to use
  • Which LCD device are you trying to use. Post a photo of it or a link to where it was purchased if you don't know,
  • Post any code that is not working. Folks need to see the code in order to provide help for stuff like syntax errors.
  • Post a complete diagram/schematic of your project. There is a lot of free software available for drawing schematics. So no excuses.
  • Post a clear close up photograph of your breadboard that shows all components and connections.
  • Steps you have taken to try to correct the issue or problem.
  • Be willing to do what is asked of you to resolve the issue. Then provide feedback after trying what is asked.
You asked a somewhat vague question.


Answer: Yes and Yes. But you have already been given the answers in other threads.

Were you unable to find a diagram? Where you unable to find the code at the links previously provided?

Let me ask you a few other questions so that others may be able to give the specific help that you need.

  • What Picaxe chips do you actually have on hand? ( Hint: An 18M is not the same as an 18M2. so please be specific)
  • Do you have a breadboard for prototyping?
  • Do you have an LCD Display on hand? If so please describe it or provide a link to where it was purchased.
  • Do you have a Digital Multimeter, Logic Analyzer or Oscilloscope?
  • How would you rate your level of expertise with Picaxe/Microcontrollers in general

Answer these questions and folks will have a much better idea of how to proceed with helping you. Ignore these and getting appropriate help may not be so easy.

Goeytex
i am in australia, i can only source any picaxe microcontrollers from altronics in AUSTRALIA,, therefore i can only source lcd displays from altronics IN AUSTRALIA,, which are only 16 x 2 lcd displays but still using the hitachi 44780 type.,.the axe132yand the axe133y and axe134y is not , i repeat, is not available thru altronics IN AUSTRALIA,.. Nobody has shown me yet with any examples of how to email schematics to the picaxe forum, so this is one giant mount everest hurdle that is really hindering my chances of getting help thru better describing my complications of trying to get a picaxe to 100% work with lcd displays only available thru altronics in AUSTRALIA ONLY..i would rate my programming skills using picaxe as about 7 out of 10.. Picaxe is an excellent device, very easy to use as compared to the new kid on the block from italy..I need to be able to email schematics to the forum,but the forum does not have an email address.. so I will have to post the diagrams by way of overseas envelope mail to the forum headquarters that I assume is in the uk..Please provide a postal address for the forum so that I can get this underway as soon as possible.., so that I can send photos as well , of the lcd display connected to a picaxe 18m2 device, and also the altronics lcd display unit.. I have absolutely no problem whatsoever getting my pe6 editor communicating with the picaxe device, passes everytime, downloads everytime, regardless of being interfaced to an lcd or anything else..If i have to use a picaxe 40x2 device to get an lcd display unit to work then so be it, because of its more available pins for parallel interface..Regards Peter
 

oracacle

Senior Member
I take your search engines don't work Australia first search result is this
Contra with a circuit diagram as well since code.

I will try and dig out our my old project that used an 18m2 when I have time but I'm currently up to my eyeballs in other work that can't just drop because someone else want to put the effort into the research.

Also despite the fact the are as good as you at programming you haven't just figured to use the attach files button for posting schematics. Just export them from your software as an image format (yes they all do that) and you will have something to post. This isn't rocket science, non of it is.

Oh by the way the 18m2 back back for the oled displays reved sell work on the 1602 displays with a few small modifications like a contrast pot and a couple of fly leads for power and ground. No software modifications are needed.

To make a start Trek quite: "they're are 2 type of people, this who can extrapolate from information."
 

inglewoodpete

Senior Member
....IN AUSTRALIA..
Yes, we know you're in Australia - it's in your signature. I also live there, or should I say here. Believe it or not, forum members are trying to help you. Your ranting does not help your cause.

I get most of my PICAXEs and LCDs from Altronics. My project that I have mentioned several times already was developed on PICAXE chips and LCDs from Altronics. I have also purchased LCDs and other components from Jaycar, another chain of hobby electronics suppliers.

Many of the genuine PICAXE chips, parts and modules are also available the Australian agents for Rev Ed, Wiltronics. They offer a mail order service through their website. I have used them on several occasions in the past.

I vow each time I reply to you that it will be the last. Perhaps I'm a sucker for punishment. Let's be constructive from now on.
 
Last edited:

lbenson

Senior Member
so I will have to post the diagrams by way of overseas envelope mail to the forum headquarters that I assume is in the uk..Please provide a postal address for the forum so that I can get this underway as soon as possible
What is this, 1978? You can post your diagrams (photographs or PDFs) using the "Attach files" button to the far left of the "Post reply" button which you use to post here.

Or ASCII art (from hippy's code which I linked to earlier in "14M to LCD? How?": https://picaxeforum.co.uk/threads/14m-to-lcd-how.9662/#post-67657
Code:
;                                        .----.
;       Out 5 -------------------------->| 14 | DB7
;       Out 4 -------------------------->| 13 | DB6
;       Out 3 -------------------------->| 12 | DB5
;       Out 2 -------------------------->| 11 | DB4
;       Out 1 ----------------------.    | 10 | DB3
;       Out 0 -------------------.  |    |  9 | DB2
;                                |  |    |  8 | DB1
;       +V    --------.------.   |  |    |  7 | DB0
;                     |      |   |  `--->|  6 | E
;                    .|.     |   |  .--->|  5 | /WR
;               10K  | |<-.  |   `--|--->|  4 | RS
;               Pot  |_|  `--|------|--->|  3 | Vo
;                     |      `------|--->|  2 | Vcc
;       0V    --------^-------------^--->|  1 | Vss
;                                        `----'

        SYMBOL  RS        = 0         ; 0 = Command   1 = Data
        SYMBOL  E         = 1         ; 0 = Idle      1 = Active
        SYMBOL  DB4       = 2         ; LCD Data Line 4
        SYMBOL  DB5       = 3         ; LCD Data Line 5
        SYMBOL  DB6       = 4         ; LCD Data Line 6
        SYMBOL  DB7       = 5         ; LCD Data Line 7
 

Goeytex

Senior Member
Attached are 2 examples of how a Parallel LCD Display can be connected to a PICAXE 28X2. In 4-bit mode with Hippy's code ( now updated by Alan) any available Pixaxe pin can be used for any Data or Control line. Simply define the pins in the code.

Liink to Hippy/Alan Code
Link to IWP Universal Code


You can open these attached files in MSPAINT and make changes or corrections as needed.

Goeytex
 

Attachments

Last edited:

peter howarth

New Member
Yes, we know you're in Australia - it's in your signature. I also live there, or should I say here. Believe it or not, forum members are trying to help you. Your ranting does not help your cause.

I get most of my PICAXEs and LCDs from Altronics. My project that I have mentioned several times already was developed on PICAXE chips and LCDs from Altronics. I have also purchased LCDs and other components from Jaycar, another chain of hobby electronics suppliers.
thankyou pete, my email address is : ######## i shall have a look on the wiltronics website and see what phil has for a picaxe to lcd starter kit,, i have recently bought the 40x2 and 28x2 devices from phil a few months ago.. do you know of any good tutorial books available for programming picaxe devices, did david lincoln end up publishing his second edition..


Edited / removed email e
 
Last edited by a moderator:

inglewoodpete

Senior Member
Wiltronics have David Lincoln's Second Edition but check the price before you order too many copies!

It's best you don't publish your email address on line like that. There are a lot of less-than-ethical robot devices out there that "harvest" email addresses off web pages and add them to their spam lists. You may end up with a lot of unwanted emails. I suggest you edit your post and remove the email address.

It you need to have 1-on-1 dialogue with another forum member, it is best to send a private message ("PM") via the envelope icon near the top of the webpage.
 

marks

Senior Member
Hi peter howarth,
The 40x2 executes its instructions faster than any other picaxe.
So using code written for others you may find your having trouble initializing your display!
here's some code from post#32, and there are some standard circuits at post#36
its the only time I used the 40x2 embarrassingly long time ago
example for you to try using D port D.4,D.5,D.6,D.7 and A.2 enable / A.3 RS
today I'd probaly write it a bit differently it is 4bit but may be wellworth giving it a try.
minimum decouplin recommended would be 22uF 0.1uF 0.1uF
Rich (BB code):
#picaxe 40X2 ' version B.3 * 4Bit OLED/LCD * marks
#no_data
#terminal off
' DB7 = D.7
' DB6 = D.6
' DB5 = D.5
' DB4 = D.4
SYMBOL E = a.2
SYMBOL RS = a.3

SYMBOL Ds18b20 = C.0
SYMBOL senddata = b0 : SYMBOL sentdata = b0
SYMBOL index = b1
SYMBOL ADCval = b2
SYMBOL SupplyV = b3
SYMBOL Temperature = W2 SYMBOL TempMsb = b5 SYMBOL TempLsb = b4
SYMBOL Sign = b6
SYMBOL D0 = b7
SYMBOL D1 = b8
SYMBOL D2 = b9
SYMBOL D3 = b10
SYMBOL D4 = b11

TABLE 0, ($30,$30,$30,$20,$20,$80,$0,$C0,$0,$10,$0,$20,$0,$60) '(4Bit)pins4567(2line/5x8)(Display On)(Clear Display)(Return Home)(Entry Mode Set)
TABLE 40, ("CaptainHaddock..")
CALIBADC10 ADCval
 SETFREQ M16

  dirsD = %11110000  
dirsA = %11111111
SupplyV = 10475 / ADCval
BinToAscii SupplyV,D2,D2,D1

IntialiseDisplay:
FOR index = 0 to 13
READTABLE index, senddata : outpinsD = senddata : PAUSE 2 : PULSOUT E,1 ' Initialise OLED/LCD
NEXT index : PAUSE 10

DisplayMarks:
HIGH RS ' charactermode
FOR index = 40 TO 55
READTABLE index, senddata
outpinsD = senddata : PULSOUT E,1 : outpinsD = senddata << 4: PULSOUT E,1 ' sending characters to line one
pause 800
NEXT index

DisplaySupplyAtPowerUp:
LOW RS :senddata = 192
outpinsD = senddata : PULSOUT E,1 : outpinsD = senddata << 4: PULSOUT E,1 : HIGH RS '(192-211) Line 2 Cursor Position

FOR index = 0 TO 14
LOOKUP index,(" Supply ",D2,".",D1," V"),senddata
outpinsD = senddata : PULSOUT E,1 : outpinsD = senddata << 4: PULSOUT E,1 ' sending characters
NEXT index : PAUSE 4000

Clearline:
LOW RS :senddata = 128
outpinsD = senddata : PULSOUT E,1 : outpinsD = senddata << 4: PULSOUT E,1 : HIGH RS '(128-147) Line 1 Cursor Position

FOR index = 0 TO 15
Let senddata =" "
outpinsD = senddata : PULSOUT E,1 : outpinsD = senddata << 4: PULSOUT E,1 ' sending characters
pause 200
NEXT index

Main:
Readtemp12 Ds18b20,Temperature

Convert:
Sign = " " ' Display +
' Temperature = Temperature + 880 * 9 / 5 - 1072 ' *uncomment for Fahrenheit (-67.0 to 257.0)
' Temperature = Temperature + 4370 ' *uncomment for Kelvin (218.1 to 398.1)
IF TempMsb > 127 THEN
Sign = "-" ' Display -
Temperature = - Temperature
ENDIF
Temperature = Temperature * 5 / 4 * 5 + 5 ' Celsius (-55.0 to 125.0) rounding up 0.05 to 0.09

BINTOASCII Temperature,D4,D3,D2,D1,D0
IF D4 = "0" THEN : D4 = " " ' leading zero blanking
IF D3 = "0" THEN : D3 = " " : ENDIF ' leading zero blanking
ENDIF

DisplayTemperature:
LOW RS :senddata = 192
outpinsD = senddata : PULSOUT E,1 : outpinsD = senddata << 4: PULSOUT E,1 : HIGH RS '(192-211) Line 2 Cursor Position

FOR index = 0 TO 15
LOOKUP index,(" ",Sign, D4,D3,D2,".",D1,223,"Celsius"),senddata
outpinsD = senddata : PULSOUT E,1 : outpinsD = senddata << 4: PULSOUT E,1 ' sending characters to line one
    NEXT index

GOTO Main
 
Top