Propeller Clock with BS2?
houser
Posts: 4
Hello everyone,
I am realtively new to stamps and have started a perhaps doomed project. As a first practical project I have started to try and construct Bob Blick's "Propeller Clock" .
More information can be found at:
··· http://www.bobblick.com/techref/projects/propclock/propclock.html
The clock uses a persistence (sp?) of vision to display messages or the time on a spinning array of LEDs. Items like this are starting to appear in retail stores, InfoGlobe being one that I have personally seen at Radio Shack and the Discovery Channel store.
Bob's original and most copies I have found use a PIC. My version, with the BS2 and a temporary "propeller" made from Legos seems to have one major flaw (o.k. there might be more than one :-). The stamp does not seem fast enough to display the digits as the propeller flings by.
I have LED's wired to the low order IO pins and with the following code I can get a "reasonable" 2. Note there is no pause in-between each "scan line".
Show2:
· LEDs = $21
· LEDs = $43
· LEDs = $45
· LEDs = $49
· LEDs = $31
· LEDs = $00
· RETURN
This gives a clean
· ***
·*··· *
····· *
··· *
· *
·*****
If I use a loop (reading data from eeprom) as in the following code:
ShowDigit:
· ' Compute the starting index of this digit's data
· startLoc = (5 * Digit) + Zero
· endLoc·· = startLoc + 5
· FOR DigitIndex = startLoc TO endLoc
··· READ DigitIndex, DigitByte
··· LEDs = DigitByte
· NEXT
· LEDs = $0000
· RETURN
Then my 2 is "squished" or drawn out, as in the time to display the "scan line" is about 4 to 5 times too slow. So this gives a (poor representation);
· ************
·****·············· ****
·············· ****
······· ****
· ****
·*************
Am I simply trying to do something here that is not well suited to the stamp -- and would be better off reverting to a (raw) PIC if I continue?
Thanks
·
I am realtively new to stamps and have started a perhaps doomed project. As a first practical project I have started to try and construct Bob Blick's "Propeller Clock" .
More information can be found at:
··· http://www.bobblick.com/techref/projects/propclock/propclock.html
The clock uses a persistence (sp?) of vision to display messages or the time on a spinning array of LEDs. Items like this are starting to appear in retail stores, InfoGlobe being one that I have personally seen at Radio Shack and the Discovery Channel store.
Bob's original and most copies I have found use a PIC. My version, with the BS2 and a temporary "propeller" made from Legos seems to have one major flaw (o.k. there might be more than one :-). The stamp does not seem fast enough to display the digits as the propeller flings by.
I have LED's wired to the low order IO pins and with the following code I can get a "reasonable" 2. Note there is no pause in-between each "scan line".
Show2:
· LEDs = $21
· LEDs = $43
· LEDs = $45
· LEDs = $49
· LEDs = $31
· LEDs = $00
· RETURN
This gives a clean
· ***
·*··· *
····· *
··· *
· *
·*****
If I use a loop (reading data from eeprom) as in the following code:
ShowDigit:
· ' Compute the starting index of this digit's data
· startLoc = (5 * Digit) + Zero
· endLoc·· = startLoc + 5
· FOR DigitIndex = startLoc TO endLoc
··· READ DigitIndex, DigitByte
··· LEDs = DigitByte
· NEXT
· LEDs = $0000
· RETURN
Then my 2 is "squished" or drawn out, as in the time to display the "scan line" is about 4 to 5 times too slow. So this gives a (poor representation);
· ************
·****·············· ****
·············· ****
······· ****
· ****
·*************
Am I simply trying to do something here that is not well suited to the stamp -- and would be better off reverting to a (raw) PIC if I continue?
Thanks
·
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
However, in your next example there is a lot more going on. FOR-NEXT loops are particularly slow in PBASIC--Each iteration of the loop can take 700 or 800 microseconds. READ is also relatively slow, taking about 500 microseconds each. It all adds up, and fast.
You might have better luck with a separate subroutine to display each digit straight out, like your first example. Your main program loop would call the straight-through for speed subroutines.
A BS2p would be better suited to this task too, better suited than a plain BS2, for a couple of reasons. First, it is over three times faster in executing instructions. Second, it has a lot more eeprom, where you could store patterns. Third, it has a "POLLWAIT" command that would be just the ticket for synchronizing the display with top dead center.
All that being said, I agree with others that a faster chip running assembly language or SX/B would best suited to this task as you need to add more features. Making it work and designing it around a Stamp is a good challenge though!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Thank you for your suggestions on the SX products. I will investigate further along those lines. Or perhaps choose a better suited project. (one that is less time critical). I think there is a 2p in my stash may mitigate the problem some.
I may still try and make a go with the BS2, but no longer have any hopes of great success. I have been experimenting with a subroutine for each digit (as the second reply mentions). This has given reasonable, but not elegant results.
I have also concluded that there does need to be a sensor to indicate Top Dead Center, as I cannot "time" the loop well enough by trial and error. With the added problems of keeping the propeller motor at a constant speed.
The clock project is very interesting. If you have not had a look, you should take a click over.
Stephen.
Post Edited (houser) : 12/6/2004 3:02:34 AM GMT
As others have said, if you really want to make this project, SX/B is a perfect fit. But if you are looking for a challange, the BS2 is certainly one. You may have to limit how many characters you can display.
Do you have a deadline for the project ?
Let me know if you decide to try SX/B I can help.
Bean.
It seems it would be more effort (and more circuitry) to actually control the motor speed, with feedback, to get the timing proper. By letting it free spin and just knowing when I hit TDC saves a bit of work.
We built a 8-LED STAMP powered "Prope
·· Ended up checking out other stuff on the site, and realized I just spent a bunch of time watching a video about Robocut, even though I couldn't understand the language.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Knight Designs
324 West Main Street
P.O. Box 97
Montour Falls, NY 14865
(607) 535-6777
Business Page:·· http://www.knightdesigns.com
Personal Page:··· http://www.lightlink.com/dream/chris
Designs Page:··· http://www.lightlink.com/dream/designs
·
I like the project. Any chance of schematics and documentation in English?
In you example code you have "pause 0". Is this a special case for the pause command? I have never encountered it before.
http://stephenhouser.com/software/propeller_clock.html
Has a bit of text, click on the photo to see more photos. I'll upload some more recent ones this evening.
I have ended up using something like the following (so far).
...
··DigitToShow = 5
··GOSUB ShowDigitBranch
...
ShowDigitBranch:
··BRANCH DigitToShow, [noparse][[/noparse]Show0, Show1, Show2, Show3, Show4, Show5, Show6, Show7, Show8, Show9, ShowColon]
··RETURN ' never get here
Show0:
··LEDs = $3e
··LEDs = $41
··LEDs = $41
··LEDs = $41
··LEDs = $41
··LEDs = $3e
··RETURN
This has helped the timing.
I have also modified the "lego" propeller parts, I should have more photos tomorrow of the current state of prototype.
·