Where is the source code for the default programs for the Activity Board and Badges
twm47099
Posts: 867
in Propeller 1
Two reasons why I'd like to know:
1. I'd like to be able to reload the EEPROM with the demo programs (after I've previously used F11 for my programs) for showing friends & relatives when they visit.
2. When using Jon's Charlieplexing wiring on my Activity Board (that still has the default program in the EEPROM which should just toggle pins 26 and 27 - the 2 yellow LEDS) the Charlieplexed LEDS 2 and 5 also light up. Based on the truth table, that means that P1 is OUT high and P0 and P1 are OUT low or alternate between OUT low and IN. To just toggle pins 26 &27 shouldn't do that, so I'd like to see the source to find out why.
Thanks
Tom
1. I'd like to be able to reload the EEPROM with the demo programs (after I've previously used F11 for my programs) for showing friends & relatives when they visit.
2. When using Jon's Charlieplexing wiring on my Activity Board (that still has the default program in the EEPROM which should just toggle pins 26 and 27 - the 2 yellow LEDS) the Charlieplexed LEDS 2 and 5 also light up. Based on the truth table, that means that P1 is OUT high and P0 and P1 are OUT low or alternate between OUT low and IN. To just toggle pins 26 &27 shouldn't do that, so I'd like to see the source to find out why.
Thanks
Tom
Comments
Likewise, I've attached my version of badge code (which is compatible with BadgeHacker). This is using the latest code base set to TECH mode (does accelerator display when you shake it).
Charlieplexing takes advantage of the tri-state nature of IO pins: they can float, be an output and low, or an output and high. To select one of six LEDs in a 3-wire Charlieplex group, line will be high, one low, the other will be floated (acts like it's not connected).
There are two 3-wire Charlieplex circuits on the badge. If you just want one LED at a time (in either group), you don't need a driver. If you want multiple LEDs in the same group to appear on (as the badge code does), then things are a little trickier. I wrote a PASM driver for both sets so that you can have any the 12 LEDs (6 discrete blue plus 2 RGB modules) appear to be on at the same time). "Appear" is the key word there.
Thanks for the information on Charlieplexing (and thanks for all your Spin Zone articles).
I wasn't clear on what I meant as the Activity Board "default" program. What I mean is that when I took a new AB and connected a battery pack to the power jack (USB NOT connected, no circuits on the breadboard), and turn on the power switch, the yellow LEDs (P26 and P27) alternately blink. So that is a Parallax preloaded program in the EEPROM.
When I built the Charlieplexing circuit from the SpinZone article and repeated the above (in other words just ran the preloaded EEPROM software), I expected that only the P26-P27 LEDS would blink as before.
But in addition to the blinking P26 and P27, LEDs 2 and 5 in the Charlieplexing circuit also lit up (steady). From the truth table that meant that P1 was Hi and P0 and P2 were low, even though when a new program starts all pins should be set to output.
So I wanted to see the source of the program preloaded into the EEPROM.
I checked the activity Board to make sure that the behavior was not due to a wiring error on my part:
1. Your Charlieplexing software ran as expected.
2. I tried a simple circuit where I connected 2 LEDs both positive sides connected to P1 and the negative sides connected through a resistor to P0 for one LED and P2 for the other. Running from the preloaded EEPROM, P26 and P27 blinked and both new LEDs lit steady, confirming that P1 was OUT HI, and P0,P2 were Out LO.
3. I tried loading the "do nothing" code (just PUB DONOTHING) into RAM from the prop tool, and nothing lit up as expected.
4. I wrote a short program to toggle P26 and P27 and loaded that to RAM. P26 and P27 alternately flashed, and the new LEDs did NOT light up, confirming that the board works, and the issue is the preloaded EEPROM program.
So I was wondering where I could find the source code for the preloaded software just to satisfy my curiosity.
Thanks
Tom
FWIW, I never connect a circuit to a new dev board without clearing the program that may be pre-installed -- you never know about a serious IO conflict that could break something.
Thanks for the idea. And yes, I have removed that program from the EEPROM, and just stored the do nothing program since I use that board for testing new circuits.
Tom