Shop OBEX P1 Docs P2 Docs Learn Events
Need to 'update' all 8-bits at nearly the same time... — Parallax Forums

Need to 'update' all 8-bits at nearly the same time...

Tech-ManTech-Man Posts: 100
edited 2011-09-01 10:14 in BASIC Stamp
I converted two old Lite Brights with a bunch of LEDs to spell out "Shine Your" and on the other "Light." For use at an upcomming David Crowder concert! Anyhows...

Each letter is made up of 15-25 LED's wired in parallel, with a common anode so I can control each letter indivisualy useing my BS2 through a ULN2803A!

Works flawlessly!!! But the way I'm programming it right now is SUPER lame and seems bulky... To create animations I'm seriusly setting here typeing out a bunch of HIGH's, PAUSE's and LOWs... I remeber seeing something before where you simply call a comand and list a bunch of bytes! So for examply... "(????) 11100101" would turn on pins 0, 2, 5, 6, 7, and 1, 3, 4 would be low.

I think this may have been in my C programming class at Purdue... So maybe PBASIC can't do it... But I was wondering what the best way to make animations would be!?! Right now I'm just working on the one that says "Light" becuase it only has 5 letters.... "Shine Your" is JUST over my 8 pins... :( May have to do some experimenting with them 595's or just through in another stamp.... IDK... I have both here as an opton...

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-09-01 09:17
    The I/O pins are also represented by a set of variables, OUTS (pins 0-15), OUTL (pins 0-7), OUTH (pins 8-15), as well as names for groups of 4 pins. Look at the Memory Allocation section of the Stamp Manual for details. You can set one of these variables to a value and the corresponding I/O pins all change at the same time.
  • Tech-ManTech-Man Posts: 100
    edited 2011-09-01 10:03
    Wow! Totaly forgot my BS2 has 16 pins!!!!!!! Don't even have to worry about those darn shift registers that I could NEVER figiur out in the first place! LOL In my defince I got them out for the first time in almost two years last night at like 12:00! Anyhow THANKY YOU!!!! I can use OUT = %11111111 then simply do a combination of DIRL = %???????? and it works flawlesly!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! So excited!
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-09-01 10:14
    Changing DIRL is not the same as changing OUTL.
    DIR changes the I/O status (making a pin an input or an output)
    OUT changes the output status (HI or LO)
Sign In or Register to comment.