5 position que
menehune1
Posts: 20
Greetings everyone.
I have a project that I'm hoping to build with a Stamp. Unfortunately I've been away from Stamps for a long while (My pbasic is at ver 1.04 ) I really need to do a refresher on programming over the summer.
I have a teaching laboratory with 16 seats. Each student has a trainer at their station and when they have completed their lab, they request the instructor to come and test them (by switching in errors on the trainer). The students currently raise their hand but the instructor may not see them and get them in the correct orderas he's walking around the lab.
Basically, something like a "now serving" sign, but with the capability to show the next five stations which are requesting service. I was figuring to wire the call buttons in an array like a 16 button phone pad and eventually have a light board which will illuminate numbers so the students and instructor can see who's next. I guess if I need to, I could just use a bell and a terminal window on a PC to keep running list of next stations. I don't know how I would add and remove numbers as they are serviced. It seems to me that I may be asking the stamp to do too much at once-wait for key presses; log and store at least five button presses; display on a tally board the current and next five stations; when serviced, remove the current number and move each number up a slot in the que.
I only have a BS2 from a BOE bot which only has 16 data lines. I'm hoping not to upgrade, but with serial out lines, keypad data lines and possibly 16 outputs, I think I will have a severe data line shortage. Is there a way to have the stamp output a serial code like hex and have an external decoder board display the data? Maybe a 1->16 demultiplexor? Or maybe even the reverse of a keypad encoder?
Post Edited (menehune1) : 5/26/2005 6:35:17 AM GMT
I have a project that I'm hoping to build with a Stamp. Unfortunately I've been away from Stamps for a long while (My pbasic is at ver 1.04 ) I really need to do a refresher on programming over the summer.
I have a teaching laboratory with 16 seats. Each student has a trainer at their station and when they have completed their lab, they request the instructor to come and test them (by switching in errors on the trainer). The students currently raise their hand but the instructor may not see them and get them in the correct orderas he's walking around the lab.
Basically, something like a "now serving" sign, but with the capability to show the next five stations which are requesting service. I was figuring to wire the call buttons in an array like a 16 button phone pad and eventually have a light board which will illuminate numbers so the students and instructor can see who's next. I guess if I need to, I could just use a bell and a terminal window on a PC to keep running list of next stations. I don't know how I would add and remove numbers as they are serviced. It seems to me that I may be asking the stamp to do too much at once-wait for key presses; log and store at least five button presses; display on a tally board the current and next five stations; when serviced, remove the current number and move each number up a slot in the que.
I only have a BS2 from a BOE bot which only has 16 data lines. I'm hoping not to upgrade, but with serial out lines, keypad data lines and possibly 16 outputs, I think I will have a severe data line shortage. Is there a way to have the stamp output a serial code like hex and have an external decoder board display the data? Maybe a 1->16 demultiplexor? Or maybe even the reverse of a keypad encoder?
Post Edited (menehune1) : 5/26/2005 6:35:17 AM GMT
Comments
i'd opt for my favorite io expander, the shift register.
try a 74hc165 to read the inputs with your bs2, it would only consume 3 pins. i'd also use a serial lcd to display the queue since it requires the least exteral components. an LED based display could utilize shift registers but it would be difficult to display the queue. 7-segment leds could display the queue, but it would be expensive.
rox on
nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Byte walks into a bar and orders a pint. Bartender asks him "What's wrong?" Byte says "Parity error." Bartender nods and says "Yeah, I thought you looked a bit off."
www.emesystems.com/BS2fsm.htm#Game%20show
The neat thing is, it takes only 4 or 5 lines of PBASIC code. Implemented as a tight state machine.
Your situation is a little different, in that you want to have means to pop the ones who have been visited off the queue. That might be done with another button.
In short, I think the project is do-able on a BS2. You would need 8 lines to scan a 4x4 key matrix, or you could use one of the external keypad scanning chips that uses only one Stamp line. There is need for an additional key for your "visited" button, or you could use it as a "shift" key. For the lamps, you could add an external driver chip like the 'HC595, or one of the higher capacity Allegro chips. Those take only 3 lines from the Stamp to address lots of lights.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I remember that program. I'll go and have a look at it.
Keypad -> hc165 input
Pin 5 -> A
Pin 6 -> B
Pin 7 -> C
Pin 8 -> D
Pin 1 -> E
Pin 2 -> F
Pin 3 -> G
Pin 4 -> H
Or am I reading the table wrong?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Good thing I got two '165s so I can use 16 switches [noparse]:)[/noparse]
Hmm, I guess I could either get a 74C922 keypad decoder chip and later swap out the keypad for the '165 or I can build from the start with the '165.
The keypad goes into the parts bin for now...*sigh* I guess I bought some extra parts [noparse]:([/noparse]
Post Edited (menehune1) : 6/8/2005 11:20:55 PM GMT