expanding I/O's
Dan990
Posts: 13
i was wondering if i can expand I/O's or just the outputs with a 8-Bit Serial-Input Latched Drivers. and if i can what the code would look like.
MIC5841/5842
http://www.datasheetarchive.com/pdf-datasheets/Datasheets-18/DSA-354088.pdf
MIC5841/5842
http://www.datasheetarchive.com/pdf-datasheets/Datasheets-18/DSA-354088.pdf
Comments
Look in the StampWorks Manual for sample code. It's available for free download from Parallax. Do a search in their webstore for StampWorks.
Just to amplify what Mike said....
http://www.datasheetarchive.com/pdf-datasheets/Datasheets-18/DSA-354088.pdf
That's the stampworks manual you need.· Page 139 of the pdf is page 130 of the manual itself
and that's example#23. BUT it's for the bs2...
Bs2 has the Shiftout command that simplifies things....
Bs1 doesn't but there's a sweet method that utilizes bit acess from b0 or b1.
I got it from one of the old bs1 news-articles....if you need the exact one (there's SO many) let me know.... I have it saved in my dishwasher notes....
for the Bs1...
I·used··>> pin0-DatOut· pin1-clock· pin2-Latch/strobe
I set Byte0 to the appropriate data out (you can still use bits0-7)
Multiplying settings by 2 shifts the data so that MSB is going out thru Bit 7
you could divide settings * 2 to let the data go LSB thru bit 0
Looks like·the way that chip you're using goes...
·it's proabably MSB you want...unless you hardwire the other way.
But I LIKE the built in darlington of that chip.... definitely simplfies...
·
·http://www.parallax.com/Portals/0/Downloads/docs/books/sw/Web-SW-v2.1.pdf
Stamp Works Code:
·http://www.parallax.com/Portals/0/Downloads/src/prod/StampWorksCode-v2.1.ZIP
Jim
heh...oops....
was working on 3-4 things...was it obvious?
Anyway.. thanks for covering for me Hover!
So I feel your pain.
Gonna need yer code tho!· Attach it wilya?
Did I mention I added water heating?·
(The unit·had the ability, (& the temp sensor)·but since we didn't pay the xtra $50.· It wasn't programmed in. . . . hmp.· Hapless consumer indeed.)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown
(Ok...it's·#110 june 2004...just use the link above...)
Includes·a method for manual stepping &..
·A potentiomer to control speed (Well, slow down from max anyway.)
We ended up using lookup & loop counting to control timing.
Lookup was a bit more visual & since the editor allows for Constants
·· ·that DON'T affect memory. Once compiled......Far more elegant
lookup Timindex,(byte/word(0),byte/word(1),....),Drumout
But to be fair.... I'm based on constant timing and not variable per Step.
The method they use DOES allow for individual timing values to be added to each output.
OH!! and WHERE did you get that IC?· I've looked around a bit...I'm unsucessful at finding a proper supplier for hobbyists.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown
Post Edited (sumdawgy) : 4/21/2010 4:08:18 PM GMT
1--Even if you don't post code but post a program outline....would help with helping you.
2--Ir signal is easy...but what for?· triggering music start?
· --you could use a photoresistor taped to a spot of monitor that triggers a low/high to fire the sequence...
···· (edit the music to a vid that lights the spot u choose.· could use to trigger steps too... Or synch major sections)
· --you could use scroll lock light to trigger photoresistor·too. (programatically)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown
http://search.digikey.com/scripts/DkSearch/dksus.dll?lang=en&site=US&WT.z_homepage_link=hp_go_button&KeyWords=MIC5841&x=27&y=23
Jim
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown
i was wondering if i can do that but have it tell the difference between colors. so if a certain color appears it will go to a certain part of the code.
Parallax also sells a color & light sensor....TCS3200-DB Color Sensor.· If there are other prepackaged solutions..I've not used or seen them so.....
One Two other ideas that comes to mind..using a 8 bit to serial and· some photoresistors fitted w/color filters tightly packed together. this would allow for some flexibility. Using 3 in a·rgb scheme each feeding an ADC....would approximate a color sensor after you set your baselines.· But if you just used RGB in a binary on/off you get 23 (8) combinations ...or 8 modes .....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown
This project can be completed...but you'll need 2 skills.
1-The ability to build the circuit.
2-The ability to build the program.
Even with help... you'll need a minimum ability in both categories.
So, if u at minimum provide an program flow outline.....I'll work with you.
.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Before you criticize someone, walk a mile in his shoes. That way if he gets angry, he'll be a mile away and barefoot. - unknown