
Wardy posted this article: Controlling six 17-segment digits using three I/O pins
Decided to start making good use of my “Propeller Professional Development Board” (PPDB) which has been sitting sadly idle and forlorn on the bench for a while.
Set a goal of making a simple video game with some of the advanced features available on the Propeller and this great dev board.
The first thing I wanted to get working was the bank of six 17-segment LED digits. It would be neat to have the player’s score show up in the LEDs as well as any “Insert Coin” or “Game Over” messages.

This looks like an interesting use of the Propeller’s multi-core capability. But unfortunately, there’s no code available on the Author’s blog post. If we can see the code, we might be able to determine if this is a .spin (interpreter) only application or if there is (much faster) PASM Propeller Assembler code incorporated. Sigh…
Dang! I hadn’t anticipated any real interest in this blog post. It’s all PASM code in face, I’ll try to get a coherent piece of PASM code on here shortly…
Watch this space.
Here we go…
https://dl.dropboxusercontent.com/u/24469109/randomblogcrap/ppdb17segmentspasm/17-segments.spin
It’ll take me some time to draw up a schematic for the three 74HC595 shift registers. For now this code simply uses Propeller IO pins: P0, P1 and P2 connected respectively to the cascaded 74HC595 chain… nENABLE, SerialData and (both RCK and SCK) signals.
The code has 4 lines with the comment “‘FLICKER EFFECT” … if you disable these, it will make the display look nice and stable. I added the flickering effect because I think it looks pretty awesome and retro.
The refresh rate of this code is pretty fast. and it does not allow more than 3 LEDs to be ON at any given time, so it’s pretty efficient in both CPU cycles and current draw. For brightness I am using the 5V rail to power the 595 chips but the Propeller is naturally running off 3.3v. The 595s are 3.3v compatible on their inputs with no risk to the Propeller.
I’ll try to get a schematic drawn up soon, but please nag me otherwise I’ll probably never get around to it.
*in response to the very first post in this thread…*
Actually this is entirely possible with a single cog and you’ll still have a lot of runtime to burn even on that same cog. Gotta love the Propeller’s insane horsepower. :D
Rushed schematic showing salient details and not much else…
https://dl.dropboxusercontent.com/u/24469109/randomblogcrap/ppdb17segmentspasm/schematic_17-seg.png
Nice work – thanks for sharing. I’ve done a couple of messy seven segment drivers in Spin only. The most I could get with standard 20mA 0.7″ seven segment displays was around eight digits before they started getting a bit too dim for indoor daytime viewing, I drove the segments fully multiplexed in parallel (8-digits of seven segments is 15 pins without Charlie-plexing). Power consumption was quite manageable of course.
The difference between PASM and Spin is like day and night. It is such a shame the Propeller never took off like the Arduino, it is so much better in many ways (but not all). I guess Parallax never “resonated” with the whole Maker cultism. Now we’re looking forward to the Prop-II – that’s going to be cool.