Step 2Prototyping:
I also went off and purchased a new CSS C compiler targeted at the 10F2xx micros. The 10F2xx family of chips is really cheap! With high hopes, I dived in and started writing lots of code.
The 10F206 has a whopping 24 bytes of RAM - the chip also sports 512 bytes of flash and one eight-bit timer. While the resources are sparse, the price is good at 41 cents in large quantities. My gosh, a million instructions per second (1 MIPS) for 41 cents! I just love Moore's Law. Evan at one off prices, the 10F206 from Digikey is listed at 66 cents.
I spent a bunch of time working with the 10F206. While working with the 10F206 I discovered that multitasking is absolutely required. The PWM output signals MUST be keep updated even while receiving new communication messages. Any interruption in updating the PWM signals will be seen as glitches on the LEDs. The human eye is really good at seeing glitches.
There are a couple of fundamental problems with the 10F206 chip. At least fundamental problems for my application. The first problem is that there are no interrupts! Catching the start of new communications using a polling loop makes for timing errors. A second problem is that there is only one timer. I just could not find a way to receive commands while maintaining the PWM outputs. The LEDs would glitch each time a new command was being received. Sharing the timer between receiving commands and driving the PWM outputs was also a major software hassle. I could not reset the timer while receiving a new character because the timer was also being used to control the PWM signals.
While working with the 10F206 I saw an article in Circuit Cellar about Freescale's new tiny MC9RS08KA1 micro. I love Freescale chips - I am a big fan of their BDM debugging. I used the Star12 chips a lot in the past (I wrote all the software for the GM Cadillac & Lacern ultrasonic system on a Star12 - my ultrasonic software is in production now on these two cars). So, I was really hopeful that their new tiny chips would be good. The price is right too, Digikey has these chips listed at 38 cents in large quantity.
Freescale was good and sent me some free samples. However, the Freescale 9RS08 chip seemed truly goofy - I could not make much headway with it. The chip also suffers with a lack of interrupts and only one timer. Oh well, at least I figured that all out without wasting money on spinning another proto board. See pics below.
Now I know - for my application I must have interrupts and more than one timer.
Back to Microchip, I found the 12F609 chip. It has interrupts and two timers. It also has 1K of flash and 64 bytes of RAM. Downside is the price; Digikey lists these chips at 76 cents in large quantity. Oh well, Moore's Law will take care of that soon enough. On the plus side, the 12F609 can also be ordered in DIP packages. On the minus side, I had to buy the next level up compiler - that kinda burned my @#$%&.
It's now April and I have learned a lot about what won't work. I have spun a board and wasted money on a compiler that I do not need. Still, testing so far is encouraging.
With the new compiler and 12F209 chips in DIP packages bench level testing went quickly. The testing confirmed I had the right chip. Time to spin another proto board! By this point, I am determined.
| « Previous Step | Download PDFView All Steps | Next Step » |

















































Make sure you also see my followup instructables. The other two instructables make use of the next generation of LED driver boards.
http://www.instructables.com/id/Kemper-LEDs-on-Vixen-Music/
http://www.instructables.com/id/Open-Source-Microchip-LED-PWM-Driver-Project/
There is also more info on my web site: http://ph-elec.com/
Thanks again for the nice comments,
Jim