News:

We're live! Join us!

Main Menu

LCD Bar Graph Demo [BS2]

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

Previous topic - Next topic

Jason D.

it would be better for me to send the parts to someone who has time

Chris Savage

Quote from: Jason D. on Feb 12, 2025, 01:30 AMit would be better for me to send the parts to someone who has time

It's all good. Maybe someday some of our wayward members will return to the fold. So many people just seemed to have disappeared over the years. I may have mentioned this elsewhere on here, but I went back through DMs on the Parallax forums and clicked on the profiles of former members of Savage///Circuits and most have not been on the Parallax forums since ~2017, which ironically was when I was laid off. Not that there's a correlation, I mean that's when Parallax started shifting their focus away from hobby / DIY stuff.

Some people seemed to have dropped off sooner, and some later. But 2017 seems to be the median year that many who were also members of my site just disappeared. Even the original members of Savage///Circuits haven't really been back. Everyone has kind of moved on or is busy.

I suppose, worst case scenario, someone tries the tutorial and asks questions. Then I will know it needs updates.  ;)

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

granz

Quote from: Chris Savage on Feb 17, 2024, 03:33 AMThis tutorial shows how to draw different types of bar graphs on a Parallax 2×16 Serial LCD.

...

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.
Chris,

I took a look at your tutorial. It seems that there is no schematic, or any description of how to hook up the circuit. I know that it should be pretty easy to look at the .BS2 files and the I/O Definitions section, but it would help to see the circuit  - especially for beginners.

Quote from: Jason D. on Feb 12, 2025, 01:30 AMit would be better for me to send the parts to someone who has time
Jason,

I have a BS2e (in a Board of Education system,) and  I just tested it and it works. It was kind of fun - the last time I played with a stamp was in ~2005, when I built a "Counterfeit Stamp" from Scott Edward's article in (IIRC) Computer Shopper magazine.  He sold kits for the thing, but I sent off a money order to Parallax and built my own on a Radio Shack protoboard. That was my first experience with microcontrollers (although I did have decades of experience working on computers.)

However, I do not have one of the Parallax serial LCD modules. And, at $45 plus S/H, I'm not likely to get one - the IIC (with which most of my microcontrollers work) costs $9, at Parallax, cheaper elsewhere, which is more do-able. If you send me yours, I am willing to set it up with my BOE and help Chris check/update his tutorial.

Chris Savage

#18
Quote from: granz on Feb 12, 2025, 04:06 PMI took a look at your tutorial. It seems that there is no schematic, or any description of how to hook up the circuit. I know that it should be pretty easy to look at the .BS2 files and the I/O Definitions section, but it would help to see the circuit  - especially for beginners.

You're right. I took it for granted that it was a single I/O pin and that it was self-explanatory.



Perhaps I will cut out the display section from this schematic and mock it up to match the tutorial. If I had an extra display I would send it to you. There are some things I have extras of, but mostly I have very little Parallax hardware these days. Most of my collection is Arduino and / or discrete stuff, including 6502 / Z80. I have a seemingly unending supply of vintage EPROMs.  ;)

It might seem pointless to some people restoring this old article, but I remember a long time ago when I would find some old sensor or accessory that I never got the chance to use, but the documentation is no longer online. Parallax once had an initiative when I worked there to make the documentation for discontinued products available. That didn't last very long.

Sadly, that's always been one of the down sides for them, discontinuing hardware, then disappearing the documentation / source / etc. As many of these displays that sold back in the day, some people might want to do something with them, and so I am trying to keep some resources available. Especially if it's something I created.

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

Jason D.

Granz,

Done, send me the info to get it to you. If you need the info Chris can give you my email address and/or necessary. You want anything you might need I might have it...

granz

Quote from: Chris Savage on Jan 11, 2025, 02:41 PMIf someone has a BS2 and a Parallax 2×16 Serial LCD, I would love to get some feedback on this as I had to reconstruct it from a forum post without images or full text.
Well, as of today (actually my mailbox received it Wednesday, but I don't get to my mailbox often enough,) I do have a Parallax 2×16 Serial LCD (thanks, Jason.)

It's a bit late now, but I intend to get busy on this Monday morning. Sorry it's so late, Chris, but you know what they say - better late than never.

Chris Savage

Quote from: granz on Mar 22, 2025, 07:46 PMWell, as of today (actually my mailbox received it Wednesday, but I don't get to my mailbox often enough,) I do have a Parallax 2×16 Serial LCD (thanks, Jason.) It's a bit late now, but I intend to get busy on this Monday morning. Sorry it's so late, Chris, but you know what they say - better late than never.

I'm just grateful to have a bit of help verifying the articles I had to "recreate". One might argue it's obsolete and not worth worrying about, but I lost so much, I'd like to put up whatever I can. I spent years making these articles.

Thanks for your help!

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

granz

Well, it was off to a rocky start, but...

' {$STAMP BS2}
' {$PBASIC 2.5}
TxPin CON 0
Baud19200 CON 32
HIGH TxPin ' Set pin high to be a serial port
PAUSE 100 ' Pause for Serial LCD to initialize
SEROUT TxPin, Baud19200, ["Hello, this text will wrap."]
  • Pasted example into BS Editor
  • Garbage output on LCD first try, then nothing but underscore ("_")
  • Noticed that LCD manual shows baud of 19200, but LCD controller only goes up to 9600 baud
  • Changed example to use 9600 baud (line 4 changed to Baud19200 CON 84) WORKS!
  • Changed the baud variable in Chris' example to 6900, also - still not working
  • Switched Tx wire on BoE from 0 (LCD manual example) to 15 (Chris' example) - working (duh! RTFM - or at least circuit, Granz)
I never did find out what that error (Nothing to tokenize) meant - nothing in the BS Editor help, nothing in manuals. Only two references in Google search: one about a guy who confused .BSE files and was trying to modify a "Lord Of The Rings" game.  :P The other from a guy who's fix was "oh, I got it working" with no explanation.  >:(

So, Chris, change the "baud" variable in your demo (only checked the first one.) Other than that, it looks like it works. I will continue through the other examples, then I will try porting it over to the (what else ;D ) PicoMite, just to make sure that I understand your program logic.

I did make a video, but my hands are so shaky (https://en.wikipedia.org/wiki/Essential_tremor - part of getting old combined with my spinal cord damage) made the video kinda nauseating to watch.  :-\ It was almost as bad as the most-stupid-video-technique of "queasy cam" (https://en.wikipedia.org/wiki/Shaky_camera).

Plus, my phone is not a great video camera anyway. Trying to switch the SD card back and forth from phone to PC (my stupid, old phone will not stay connected to my PC for copying/moving the files) is UNBEARABLE! What kind of idiot would set up the SD card totally internal? I have to shut down the phone, then open it up and remove the battery to get to the SD card. Back when I got my first phone (a T-Mobile G-1,) it had an external SD cards slot - no need to take the phone apart to get to it. I believe that there should be TWO SD cards in every phone - one internal, and one external; kind of like a hard drive inside a computer, and a floppy drive exposed to the outside.

So anyway, I broke out my real video camera, and my tripod, to make a better ( more stable) video - battery is dead.  ::) Video should be available tomorrow. I need to build a video studio into my work room.

BTW - Chris, is there any way to post a video without having to upload it to YouTube first?

Chris Savage

Quote from: granz on Mar 25, 2025, 04:20 PMSo, Chris, change the "baud" variable in your demo (only checked the first one.) Other than that, it looks like it works.

I used the highest baud rate because there's a lot of traffic (data) going to the LCD while trying to update the displays at high speed. If you select a lower baud rate, it will slow down the response time.

Quote from: granz on Mar 25, 2025, 04:20 PMI will continue through the other examples, then I will try porting it over to the (what else ;D ) PicoMite, just to make sure that I understand your program logic.

That would be cool to see this ported to other platforms.

Quote from: granz on Mar 25, 2025, 04:20 PMBTW - Chris, is there any way to post a video without having to upload it to YouTube first?

No. All of my videos are hosted on YouTube and then linked here using the YouTube button.

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

granz

Quote from: Chris Savage on Mar 25, 2025, 08:56 PMI used the highest baud rate because there's a lot of traffic (data) going to the LCD while trying to update the displays at high speed. If you select a lower baud rate, it will slow down the response time.
Oops, I see now that I missed; for some reason, I thought that the LCD showed that it could only go up to 9600 baud. Somehow I missed the bottom of the chart showing that it could go up to 19,200 baud. However, it does work fine at 9600 baud. I'll give it a try at 19.2K and let you know how it goes.

granz

I've been getting some strange results in running your programs, Chris. Nothing seems to be working the way it should. For example, when I tried loading the high-resolution bar graph, it runs the blocky, low-res bar graph. Another thing that I've noticed is that when in the BS Editor, strange things happen, like CTRL-A does not select all of the text - even though the Edit menu shows the keyboard shortcut for select all as CTRL-A.

I'm not sure what is going on (other than poltergeists?  :o should I do an exorcism on my computer, or on the BS Editor?) So, I'm going to move the stuff for this tutorial over to my XP Netbook (which is running XP natively, not under Wine nor Virtual Box or any other Windows emulator.) It will be a bit of a pain, since I would prefer to not connect it directly to the Internet, so download all the stuff on my main computer onto a USB thumb drive, and then move that over to the XP system.

I'll get back to the tutorial soon, and let you know what happens.

Chris Savage

Quote from: granz on Mar 31, 2025, 09:02 PMI'll get back to the tutorial soon, and let you know what happens.

No problem.

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

granz

OK, I (finally  ::) ) got around to verifying the tutorial programs. Each one of the sample programs ran as advertised (with the below stipulation that I select my specific Stamp.)

Here is the whole setup, showing the wires connecting the Serial LCD and the BASIC Stamp board. I used the (original; meaning old, can't even find docs for this one, only the newer ones with the slide switch near the reset on mine) Parallax Board of Education (BoE). It's a really cool little dev kit, and I love it. The BoE can take any of several different models of BS2, and mine is using (right now) a BS2e (a bit higher level Stamp than the original BS2.)


Here is a close-up pic of the wiring for the connections to the BoE:

The black (ground) wire is a bit hard to see, I should have used a white background.

As you can see, the wiring is REALLY simple - there are only three wires, two for power and ground (red and black here) going to the Vdd (+5V), and Vss (Gnd,) and one wire (blue) going to pin P15 on the BoE.

The only other thing that had to be done was to select the BS2e (one click on the tool bar) from within the Stamp Editor - this added a line to tell the compiler which Stamp was being used. Since I did not save that change when exiting (in case I wanted to use a different stamp later) I just had to re-select the BS2e every time I ran the program.

Chris Savage

Quote from: granz on Apr 05, 2025, 02:57 PMOK, I (finally  ::) ) got around to verifying the tutorial programs. Each one of the sample programs ran as advertised (with the below stipulation that I select my specific Stamp.)

Thank you, granz. I am still going to update the schematic, but I am glad to find that the uploads work as expected for someone who has never tried them.

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