Shop OBEX P1 Docs P2 Docs Learn Events
Using BS1 as a serial to parallel converter for 2x16 LCD? — Parallax Forums

Using BS1 as a serial to parallel converter for 2x16 LCD?

Tech-ManTech-Man Posts: 100
edited 2009-12-15 04:05 in BASIC Stamp
Hello,

I was wondering if anyone has ever tried to use a basic stamp as a "dedicated interface" between LCD's and other basic stamps to simplify the programming/reduce pin use on the main basic stamp(s) I know they sell "backpacks" and stuff but if I can somehow use materials I already have why not... I was hopping to use my old BS1 as the interface if that's possible? If not I have a few BS2p's and could use one of them...

I could try and figure this all out on my own but that would take forever... With college and everything I just don't have that much time these days... I have downloaded the code for LCD and it works great! But that takes seven pins... I have never done it but you can "talk" between BS modules right? RS232? Anyhow if so maybe theres a way I can make this work...

IDK...

Project I'm attempting (over loaded right now but would love to do this...) to do is a light controller... I've built on in the past for X-mas lights (also built 16 SSR's for AC control).... But all it did way send a bunch of highs and lows with some pauses to each channel... not very professional...

I imagine a little board with a bank of buttons similar to the big expansive DMX lighting board we have at school. I have no idea how ill do it but I'll have menus and stuff on the LCD that you scroll through with little buttons.... And you enter lights and stuff that you want in a "scene" it will remember them and like link them to scene buttons...

IDK.... Just an Idea... So... If anyone has information on sending serial data to and from basic stamps that would be awesome (to and from basic stamps and "basic stamp LCD controllers" would be a PLUS+! Also if you have some old code that you used to make menus and stuff that would be nice! Just want to take a look at it!

Pretty much any code I can get my hands on... I'll look it over and try to absorb it... Im got at piecing things together!

Thanks!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There are no Undo buttons in life.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-12-06 03:04
    A Basic Stamp isn't a good choice for this. The main problem is that Stamps can only do one thing at a time. In particular, when a Stamp is sending data to an LCD, it can't listen to an I/O pin for serial input and anything sent at that time is missed. One way around this would be to use handshaking between the two Stamps. The documentation on the SERIN and SEROUT statements shows how to do this. There's also a nice pair of Nuts and Volts Columns on networking several Stamps. Go to the main Parallax webpage and click on the Resources tab and you'll see a link to the index of Nuts and Volts Columns.
  • Julie in TexasJulie in Texas Posts: 21
    edited 2009-12-07 15:06
    Depending on who's sending the data, using hardware handshaking (RTS / CTS) would be one approach. Lower CTS while talking to LCDs, raise CTS when ready to read serial data. Also, drain any available data by looping on SERIN with the timeout option. Once you've read all the data (if there was any), go process it.

    It's call "Polling" and it's a very effective technique for handling this problem.

    Post Edited (Julie in Texas) : 12/7/2009 4:21:02 PM GMT
  • Tech-ManTech-Man Posts: 100
    edited 2009-12-15 04:05
    Ok I really am trying to figure all this out... But first I'm having a problem with my LCD... Sometimes it will display my dada and sometimes it will just display little boxes all across the fist line... I thought it was a problem with my wiring but it's not... Any suggestions? Also where do i find more info about using parallel LCDs... The application note or whatever that is on the Parallax website shows some example code and how to wire the thing but thats about it... I mean how do I store a variable to be displayed when i want it to, what do all the commands mean? Some are for initializing... some are for going to next line and one for clearing it ext... But there are bound to be more...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    There are no Undo buttons in life.
Sign In or Register to comment.