Shop OBEX P1 Docs P2 Docs Learn Events
LCD to use and LCD features? — Parallax Forums

LCD to use and LCD features?

egereger Posts: 9
edited 2005-09-13 05:14 in BASIC Stamp
I'm new to BASIC Stamps and when I first found out about these microcontrollers I was fascinated and had to have one.
I'm pretty new to circuits and programming. But I have been taking apart electronics and fixing·things for years. I guess that is why I am so interested in these stamps!

I have been playing with my·stamp and a 2x16 char LCD with an HD44780 driver. Took me a while to figure out the correct pinout and wiring for the LCD to the dev board. I finally got it working and was just making it display text and some custom characters.

Maybe someone could answer some questions for me here, I didn't know where to ask. I think these mostly pertain to LCD's and not the BS2.

·- The LCD I have uses a HD44780 driver. I looked at the setup for a serial controlled LCD and it looked like it only needed 1 data wire!. Is there any advantage to using parallel over serial or is serial just much easier to use in this application?
·- Would a serial LCD module such as this work with a BS2 and even be able to use the buttons? http://www.crystalfontz.com/products/633/index.html
·- I was looking up how to ramp current (for fading an LED for example) and discovered the PWM command·can do this. Is it possible to use PWM command to control LCD contrast or backlight via software?

My first project with my BS2 will be using 2 LCD's and some buttons to browse menus so I was hoping something like link above might be possible to use with minimal IO pins.

Any info is appreciated!

Thanks!

Comments

  • knightofoldcodeknightofoldcode Posts: 233
    edited 2005-09-12 07:01
    eger said...
    I'm new to BASIC Stamps and when I first found out about these microcontrollers I was fascinated and had to have one.
    I'm pretty new to circuits and programming. But I have been taking apart electronics and fixing things for years. I guess that is why I am so interested in these stamps!



    I have been playing with my stamp and a 2x16 char LCD with an HD44780 driver. Took me a while to figure out the correct pinout and wiring for the LCD to the dev board. I finally got it working and was just making it display text and some custom characters.



    Maybe someone could answer some questions for me here, I didn't know where to ask. I think these mostly pertain to LCD's and not the BS2.



    - The LCD I have uses a HD44780 driver. I looked at the setup for a serial controlled LCD and it looked like it only needed 1 data wire!. Is there any advantage to using parallel over serial or is serial just much easier to use in this application?

    - Would a serial LCD module such as this work with a BS2 and even be able to use the buttons? http://www.crystalfontz.com/products/633/index.html

    - I was looking up how to ramp current (for fading an LED for example) and discovered the PWM command can do this. Is it possible to use PWM command to control LCD contrast or backlight via software?



    My first project with my BS2 will be using 2 LCD's and some buttons to browse menus so I was hoping something like link above might be possible to use with minimal IO pins.



    Any info is appreciated!



    Thanks!
    eger said...
    The LCD I have uses a HD44780 driver. I looked at the setup for a serial controlled LCD and it looked like it only needed 1 data wire!. Is there any advantage to using parallel over serial or is serial just much easier to use in this application?

    Not really. Mostly the advantage is the number of pins required. A parallel screen will give you slightly more control, but it can also cause too much control. (weird charactors, unintended results.) Serial requires just one wire from a MCU (Microntroller, such as a Basic Stamp).
    eger said...
    Would a serial LCD module such as this work with a BS2 and even be able to use the buttons? http://www.crystalfontz.com/products/633/index.html
    Absolutly! However, I wouldn't suggest it. I own a CF633, and let me tell you, the CF633 uses a CRC packet check, and it is VERY hard to understand. I previously programmed on it for a Visual Basic application, and it's extremly difficult to operate. I'd really prefer the unit come with a dip switch to not use CRC's. The 633 is used primarily for PC's, in particular for servers. It's designed to sit inside a 1U rack mount case, it's a slick display, don't get me wrong, it's just likly to be difficult to get working. If you do get it working in a BS enviornment, I'd be thrilled to see it. Button use is also possible, but again, not recommended.
    eger said...
    I was looking up how to ramp current (for fading an LED for example) and discovered the PWM command can do this. Is it possible to use PWM command to control LCD contrast or backlight via software?
    I'm not sure, however I wouldn't suggest it. Your'e putting too much load on the BS2. It can't output much power, and shouldn't be used for a backlight, at least not directly. The CF633 that you mentioned has software control over it's backlight, so you wouldn't need anything but a BS2 command sent down the serial line. However with other LCD's taht have a potentiometer as the control for contrast and backlight, I'd suggest a Digital Potentiometer. Link for this is below.

    I would suggest a simpler LCD screen, one without packet's. Eitehr the CrystalFontz 632, 634, or the Matrix Orbital screens. My first LCD screen was a CF634, and it's excellent, then I got a CF633, and CF632.... Then I bought a Matrix Orbital graphic screen, I'm absolutly tickled pink with it. Keypad input, to have your own keypad, whatever you want, not just 5 buttons like the 633, but a full 16 key keypad! Most of the MO screens are this way. The major advantage to the CF633 is the fan control, and ATX power control. Do you need either of these functions? If not, I'd suggest against the CF633. The CF632 and CF634 does not use a complex CRC packet's. Just serial data, very easy to use with the BS2.

    Link to 10K Digital Potentiometer
    www.parallax.com/detail.asp?product_id=604-00010

    Link to 100K Digital Potentiometer
    www.parallax.com/detail.asp?product_id=152-01041

    Link to how to use the Digital Potentiometers.
    www.parallax.com/dl/docs/cols/nv/vol1/col/nv18.pdf

    Link to Matrix Orbital
    www.matrixorbital.com

    Link to CrystalFontz
    www.crystalfontz.com


    Knight.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-12 14:21
    eger,

    ·· Parallel LCDs give you two things not always available in serial LCDs...One is speed.· The fastest way to write to an LCD is through the 8-bit bus using the busy flag.· Of course, this isn't really something that applies to, or is a concern with the BASIC Stamp, but if you were using an SX and wanted high-speed...

    ·· The other thing is the ability to read back data stored in memory locations on the LCD.· Not all Serial Displays allow this.· As for contrast, years ago we tested and successfully used an 4-bit R2R Ladder from half an 8-bit I/O port to control the LCD contrast.· This might be something to look into.· Then you could have program control of the contrast.

    ·· As a side-note, Parallax has an inexpensive serial LCD Display here:

    http://www.parallax.com/detail.asp?product_id=27976

    ·· And one with a backlight for just $5.00 more here:

    http://www.parallax.com/detail.asp?product_id=27977

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • egereger Posts: 9
    edited 2005-09-12 16:30
    Thanks for all this great info!!!

    One more question I forgot to ask...

    I was playing with custom characters and loading them onto my HD44780 LCD and I was having trouble getting characters to work past 8. Then I found out that the CGRAM (where custom characters are stored?) only holds up to 8 characters that are 5x8 dots. Are there any LCD's that have larger CGRAM for holding maybe 16, 32, or more custom characters?

    I think my next LCD will be a serial one for ease of use. Once I get a little more into it I may try one of the serial LCD's with built in keys and other goodies. The crystalfontz one was the cheapest one I could find. But since it sounds difficult to get working I guess i'll stick with a simple serial LCD and some external buttons for now.

    Again, much appreciated help!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-12 16:58
    eger,

    ·· LCDs that follow the Hitachi 44780 standard won't have more than 8 custom characters (0-7) due to compatibility.· You have two options though...One would be to alter the CGRAM on the fly.· This will work if you are not using all 8 custom characters at once.· This works because when you load a new character into the CGRAM the character on the display is updated immediately.··The other option is to get a graphical LCD.·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • knightofoldcodeknightofoldcode Posts: 233
    edited 2005-09-13 04:39
    Chris Savage (Parallax) said...
    eger,

    LCDs that follow the Hitachi 44780 standard won't have more than 8 custom characters (0-7) due to compatibility. You have two options though...One would be to alter the CGRAM on the fly. This will work if you are not using all 8 custom characters at once. This works because when you load a new character into the CGRAM the character on the display is updated immediately. The other option is to get a graphical LCD.

    Depending on the application, getting a graphical LCD can make the project look EXTREMLY professional, but they are more expensive and sometimes harder to get working.

    Knight.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-13 04:49
    Knight,

    ··· You are certainly correct, generally speaking graphical displays require more work to setup and use, but give you more control of individual pixels to overcome limitations of text displays.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • egereger Posts: 9
    edited 2005-09-13 05:14
    A little too expensive for an amateur like me. I'd be more interested in getting one of those professional demo boards with lots of built in goodies before I spend that kind of money on something I don't know how to use yet =)

    This is great info though. Glad I registered on the boards.

    I think my first goal will be to buy that dual digital pot and try to write a simple program which has a menu on lcd for changing contrast and backlight brightness.

    Hope that idea will work out.
Sign In or Register to comment.