Shop OBEX P1 Docs P2 Docs Learn Events
LCD selection for BS2p40 — Parallax Forums

LCD selection for BS2p40

LloydsLloyds Posts: 75
edited 2010-05-30 04:51 in BASIC Stamp
Hi,
I've been having fun and success with a BS2 for a while but need to upgrade to a BS2p40, 40 pin module for the additional I/O·and to use an LCD.· But I am not sure which type of LCD is most compatable with the BS2p40.
The syntax manual says that LCDCMD and LCDOUT work with the Hitachi 44780 controller.
Looking at the Parallax store, the 2x16 Parallel 603-00006 looks like it is 44780 compatible.·
Does that mean the Hitachi controller is part of the LCD display?
So this display will connect directly to the 2p40 module (as shown in the syntax manual page 250)?· The pin-outs in the LCD documentation·match the syntax manual pin-outs.

But also, If I wanted to choose another display for the 2p, what info on the LCD data sheet do I look for so that I buy something that will work?·· Parallel; HD44780 compatible; what else?

Thanks very much,
Lloyd

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-05-20 15:06
    Manual said...
    The syntax manual says that LCDCMD and LCDOUT work with the Hitachi 44780 controller.
    You would look for compatible displays, if it does not say 44780 be wary.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • electrosyselectrosys Posts: 212
    edited 2010-05-20 15:12
    Hello Lloyd,

    I try to answer you, as much as I know about LCDs:
    ······ ...I am not sure which type of LCD is most compatable with the BS2p40
    The three LCD commands LCDCMD LCDIN & LCDOUT are based on Hitachi 44780 chip·controller (as you mentioned) and are compatible with BS2p /pe /px.
    Hitachi 44780 controller is one of very common and the most popular (character) LCD module·one could find. The 44780 based LCD, could be find at 8x2, 16x1, 16x2, 16x4, 20x2, 20x4, 40x2 and some more...·Parallax has the 8x2, 16x2 and 20x4 Hitachi based LCD modules, you can use any LCD module based on Hitachi 44780 controller or other controller chips·as long as they·are compatible with 44780 IC.
    Does that mean the Hitachi controller is part of the LCD display?
    ······ Yes, the 44870 controller IC·is·montaged·at the back of the LCD module,·processing all the digtal tasks.
    But also, If I wanted to choose another display for the 2p, what info on the LCD data sheet do I look...
    You can also use any other LCD module based on other chip conteroller then 44780 chip, both·parallel or serial interfaces LCDs, but you have to write a new driver (for parallel LCD, the serial LCD doesn't need a·driver, only SEROUT command) The three commands LCDCMD, LCDIN & LCDOUT, can not be use with other then 44780 based LCD module.
    When I look at the new character·LCD datasheet, I look to·see if·controller chip·is 44780 or compatible with that, then I look to pin assignment, voltage and some other info...

    There are also I2C and SPI based LCD module, which needs·other approach and code skills.
    If you are new·at LCDs, I will·advice you to get a serial enable·LCD.·Working with·serial LCD
    is·much more easier,·it needs only one i/o pin and·a few commands·to run.
    I hope that could·help you

    Regards
    Reza
  • LloydsLloyds Posts: 75
    edited 2010-05-20 16:05
    Thanks to you both, this is very helpful.
    I will probably stick with the 44780 compatible for now, but will also give one of the one-wire displays a try.
    I appreciate it.

    Lloyd
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2010-05-21 01:56
  • rixterrixter Posts: 95
    edited 2010-05-21 04:17
    Lloyds,

    I've played around with LCDs from several manufacturers and learned a few things along the way. Some LCD units that I've purchased on the internet did not have reliable documentation for pinouts. While there is a semi-standard way that most parallel LCDs have the pins for connection, some differ. I've only purchased serial LCDs from Parallax and they are easier to use. You can certainly count on great documentation and support from Parallax as well. This is something that is lacking with purchases from some of the Asian dealers in my experiences. Parallax does not have a 4x40 LCD, so I had to shop elsewhere. As far as I am aware, they are only available in parallel versions. Crystal Fonts ended up being the best place to get them and their online documentation was very good. You can get Hitachi 44780 controller information just about anywhere. Most people attach the LCD to the BS2 in 4 bit mode that requires fewer pin connections... something that may be less of an issue with the BS2p-40. You will also be required to "manage" backlighting functions if you get a backlit model. I've never used one of the BS2 pins for this, but rather with a toggle switch that controls current to the back light, which is generally LED by the way.

    Rick
  • LloydsLloyds Posts: 75
    edited 2010-05-22 11:52
    Everyone,
    Thanks for all the great info. I will be making several of these eventually, so selecting the display is pretty important.

    Some of the comments seem to say that the serial LCDs are "easier" to use than the parallel. Using the BS2P40, having enough pins for parallel won't be an issue. What does "easier" mean? Here's some more info about my application that might be helpful.

    The display will be used outdoors in all light conditions, so as Rick said, I'll have to "manage" the back lighting, maybe with light sensor. I've even seen some displays with selectable back light colors and that could be an added plus for my application: an instant visual indication of system state.

    My real concern is the preponderance of messages I need to display. Depending on the input states and internal calculations, I have numerous different messages (text strings) to display, including many with variable information. Some will need to scroll, and I might end up with a 4 button keypad to navigate and page through the display. And a few custom display characters will be nice too.

    Based on all that, does it make sense to stick with a 44780 compatible display to take advantage of the LCDOUT command? I'd like to keep the programming of the LCD as easy, and changeable, as possible.

    Thanks again,
    Lloyd
  • JonathanJonathan Posts: 1,023
    edited 2010-05-22 14:43
    LLyod,

    As long as you use a compatible· LCD, parallel is just as easy as serial, programming-wise. It is more complex hardware-wise, but not too much. It's often more a question of can you afford the pins. And if you can afford the LCD. Parallel LCD's are usually cheaper, more common and available surplus/used/cheap.

    If incompatible, you have a tough row to hoe. And it may not be possible in PBASIC, I dunno.

    As to how much you need to display, that can eat up memory quick. I assume you know that they BS2p has "slots" for more programming. If you eat all of that up, an eeprom can be used to store more.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • rixterrixter Posts: 95
    edited 2010-05-22 19:45
    Lloyd,

    I didn't mean to be confusing when I said "Manage" the back light. With serial LCDs, there is typically a command to turn on the back light. With a parallel LCD, there are two pins on the board that are for the LED back light... one labelled A and the other K. These are anode and cathode, or VDD and VSS. Some with run a BS2 pin to the positive to control current to the back light, and thus back lighting. I chose to control current to the back light via a toggle switch. I've never implemented anything that automatically back lights depending on ambient light conditions. Intersting idea though. I just do it manually when needed.

    With a serial LCD you are using SEROUT commands to communicate to the LCD and it only requires three BS2 pins. The parallel LCD is communicated to with either LCDOUT/LCDCMD command or even PULSOUT commands. You will require at least six BS2 pins for the parallel.... seven if you need to read from the LCD and eight if you have a second controller in the LCD (greater than 80 character LCDs).

    I recently submitted a completed LCD project that touches on several of your concerns. Have a look: http://www.parallax.com/tabid/863/Default.aspx

    Rick
  • LloydsLloyds Posts: 75
    edited 2010-05-25 01:25
    Hi Rick,
    VERY nice project. But it can get dangerous when one hobby feeds another. Different hobby for me, but I'm in the same boat. Your cycling looks pretty serious.

    I was looking over the read and write programs and can see where I'll be able to use some of the techniques for my project. The ability to load the data into the EEPROM directly from a thumb drive instead of from a laptop is something I hadn't run across, but it's something I'll definitely use. In the Write program you referenced some Parallax data logger demo code that you started with. Did that come with the USB-serial adapter, at least that's what I think I see in the photo of the guts?

    Thanks !
    Lloyd
  • rixterrixter Posts: 95
    edited 2010-05-25 04:49
    Lloyd,

    Thanks for the compliment. The advantage of using Parallax Memory Stick Datalogger that you see was I could use the bike device away from a computer. I do not have a laptop. There were times when I was away from home on a cycling vacation and had to load up a second route than the one that was already loaded using a thumbdrive. The sample code was a good starting point, but record size issues and finally understanding that a CR & LF characters are at the end of each record line read from the Datalogger and I had to strip them off were challenges. The sample code is here: linehttp://www.parallax.com/Store/Accessories/CommunicationRF/tabid/161/CategoryID/36/List/0/SortField/0/Level/a/ProductID/434/Default.aspx

    I used a previous version of this cycle device all of last season. It used the Parallax 4x20 serial LCD. It was easier to program and way easier to wire up to the BS2pe. But I couldn't get enough of the route instructions on a line. Also the "proto-type" box I had suffered in inclement weather. The LCD front cannot be exposed to water. I assumed those were sealed. The new version is completely under plexiglas.

    Rick
  • LloydsLloyds Posts: 75
    edited 2010-05-26 04:00
    Rick,
    Thanks for the additional info. You say that the serial LCD was easier to program. The LCDOUT command only writes to a parallel display, but is supposed to make for easier programming. I will need to display a lot of text, and also a lot of variable values on the display. Strictly from a programming standpoint, do you think the serial is better than the parallel?
    Thanks,
    Lloyd
  • LloydsLloyds Posts: 75
    edited 2010-05-26 04:07
    Jonathan,
    I just re-read your post and it sounds like a bit of a coin toss. I've got the pins and I don't mind the extra wiring, although, eventually the pin-count may be an issue. Easy programming still is my issue. I have a lot of text and variables to display.
    Thanks,
    Lloyd
  • rixterrixter Posts: 95
    edited 2010-05-26 12:15
    Lloyd,

    Neither using the SEROUT for serial LCDs or the LCDCMD/LCDOUT command for parallel LCDS are necessarily difficult, but there is a bit more to do with the parallel LCD. You will note that you have several commands to initialize a parallel LCD that are not required for use of the serial LCD. With the serial LCD, initilization is one SEROUT command. No big deal.. you do it once at the beginning of the program and you're done with it. Parallel LCD commands are broken down into LCDCMD (for sending commands to the LCD) and LCDOUT (for sending data to the LCD). These are rolled into parameters in the SEROUT command for serial LCDs. Again, not a major deal either way and I certainly wouldn't let the difference in programming be a deciding factor in which LCD type to use.

    Rick
  • Dave-WDave-W Posts: 94
    edited 2010-05-26 22:11
    Lloyd,

    If you are new to LCD displays then the best choice would be one of the Parallax serial displays. A few are even on sale as we speak. The serial graphic display will fit any project you might have now and in the near future. The serial displays are more money but save lots of valuable ports and can be used with the BS2 where you might have had to use a BS2-40. Also, the ease of programming will teach you much about the needs of the display itself.

    There are TONS of examples on the Parallax site.

    Good luck,



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave W.

    Mahwah, NJ 07430
  • Pressus LimitedPressus Limited Posts: 23
    edited 2010-05-27 16:22
    Hi Lloyd,

    I have just started using the WINSTAR WH2004A 4x20 green LCD's with the BS2p40 and found it's been really easy to do.· The screens are reasonably cheap, have a backlight and seem to be pretty bullet proof. I accidently touched 24V to the 5V rail and it survived..... the rest of my board was fryed but the screen was ok!

    I used to use the serial displays with the SEROUT command and have found that the software transition using the LCDOUT command is very similar.· I turn on/off the backlight with a 2N7000 FET wired to P0, with P1 the enable pin for the LCD.· The rest of the LCD wiring is as the Pbasic manual and the example code worked without modification.· The only thing I did is setup 4 constants to define the start position of each line as the screen map is a bit confusing.·

    I then have a 6 button membrane keypad that goes over the LCD and gives it some protection.· F1 & F2 I use as hotkeys with functions determined by the text I place on the screen above each of them such as ENTER & RESET etc.· The membrane isn't the cheapest way to add switches but it gives a quality feel and finish to the project.

    Jon
  • LloydsLloyds Posts: 75
    edited 2010-05-30 04:51
    Thanks to all for the advice. I just need to get off dead center, make a selection and get to work. The answer to the program slots in the P40 question in the forum fits right into this too.
    Lloyd
Sign In or Register to comment.