News:

The Savage///Circuits website has been upgraded to a more efficient theme.

Main Menu

LCD Bar Graph Demo [BS2]

Started by Chris Savage, Feb 17, 2024, 03:33 AM

Previous topic - Next topic

Chris Savage

This tutorial shows how to draw different types of bar graphs on a Parallax 2×16 Serial LCD.



CLICK HERE TO GO TO THIS TUTORIAL ON THE SAVAGE///CIRCUITS WEBSITE

        I'm only responsible for what I say, not what you understand.

Chris Savage

If someone has a BS2 and a Parallax 2x16 Serial LCD Display, I would love to get some feedback on this as I had to reconstruct it from a forum post without images or full text.

        I'm only responsible for what I say, not what you understand.

Jason D.

I think I have both of those things, I know I have the 2x16 serial LCD display. Do you need someone to assemble, wire, and run software to see how it works? or something else?

Chris Savage

Quote from: Jason D. on Jan 12, 2025, 12:49 AMI think I have both of those things, I know I have the 2x16 serial LCD display. Do you need someone to assemble, wire, and run software to see how it works? or something else?

Jason,

Thanks for replying. Yes, I was hoping to have someone follow the article, check the code and make sure everything does what it says it does; that the graphics match the expected output from your own LCD, etc.

Part of the reason is that my one LCD was acting up during testing and my only two  BOE boards have a bad power switch, so things were a little glitchy. I updated the code I posted on the Parallax forums back in 2005.

        I'm only responsible for what I say, not what you understand.

JKnightandKARR

I have them to, but my displays are other brands, would that matter??

Chris Savage

Quote from: JKnightandKARR on Jan 13, 2025, 08:55 PMI have them to, but my displays are other brands, would that matter??

Yes, because the Parallax Serial Displays have their own command set for clearing the screen, moving the cursors, etc.

The code could be adapted to your display if it supports creating custom characters, but I would need the specifications to determine that.

        I'm only responsible for what I say, not what you understand.

JKnightandKARR

Gota ya. Would have to try n find out who made them... came in arduino type kits

Chris Savage

#7
Quote from: JKnightandKARR on Jan 14, 2025, 10:23 AMGota ya. Would have to try n find out who made them... came in arduino type kits

Many displays for the Arduino are I2C or SPI. Are you sure these are serial? In fact, in this thread on the ZappBots forums, I posted about the following display, which is I2C and even showed some love to ZappBots on the display.

You cannot view this attachment.

        I'm only responsible for what I say, not what you understand.

JKnightandKARR

I will have to look actually. not sure. never messed with them.

Chris Savage

Quote from: JKnightandKARR on Jan 14, 2025, 11:32 PMI will have to look actually. not sure. never messed with them.

Yeah, just look at the connections on the back, for example, the one I referenced looks like below. The SDA / SCL tells me it's an I2C interface. If it had MISO / MOSI and / or a CS line, it would probably be SPI. RX (and possible TX) would be serial. And of course, if it has a 10, 14 or 16 pin interface, that's parallel.  ;)

You cannot view this attachment.

        I'm only responsible for what I say, not what you understand.

JKnightandKARR

Yeah... mines gotta be parallel. lol

Chris Savage

#11
Quote from: JKnightandKARR on Jan 15, 2025, 11:56 PMYeah... mines gotta be parallel. lol

Parallel displays are great for Z80 / 6502 or similar CPUs, but not  great for microcontrollers which have limited I/O pins. The absolute minimum to run a parallel LCD is six I/O pins and even that involves properly timed commands and no ability to read data back from the display (including the busy flag). Seven I/O pins will give you better control, but you're still running in 4-bit mode requiring two transactions per command / data write.

You can easily add a serial, I2C or SPI backpack to an LCD to make it easier, or you can use a shift register to reduce I/O pins, but further complicate the unidirectional communication.  ;) In post #9 above you can see the I2C backpack added to a standard parallel display to make it more friendly for microcontrollers such as the Arduino.

        I'm only responsible for what I say, not what you understand.

Chris Savage

Let me know if you have any additional questions about Character LCDs. I've been using the HD44780 Hitachi-compatible units since ~1990 in multiple platforms.

        I'm only responsible for what I say, not what you understand.

Chris Savage

Quote from: Jason D. on Jan 12, 2025, 12:49 AMI think I have both of those things, I know I have the 2x16 serial LCD display. Do you need someone to assemble, wire, and run software to see how it works? or something else?

Just curious if you had the chance to check this out?

        I'm only responsible for what I say, not what you understand.

Jason D.

Hey Chris,

I have not had any time to look at the project and code you put together, my life is overwhelming right now.