3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Designing a Multi Node LED PWM Lamp

Step 2Prototyping:

Prototyping:
«
  • DSCN3619.JPG
  • DSCN3618.JPG
  • DSCN3604.JPG
  • DSCN3611_2.JPG
  • DSCN3596.JPG
  • Kemper Chip Example.jpg
It's now early January and off I go. I found the 10F206 at Digikey and it is really cheap! So, I spin a proto board to hold a 10F206 micro from Microchip. I designed a quick board because the 10F2xx is not available in a DIP package. Bottom line, I did not want to hassle with the small chip. (I was so confident back in January)

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 StepDownload PDFView All StepsNext Step »
3 comments
Jan 1, 2011. 6:57 AMcarl_can says:
(removed by author or community request)
Jan 3, 2011. 6:08 AMcarl_can says:
I will. Thanks again, your writings are interesting.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
54
Followers
16
Author:jimk3038(www.ph-elec.com)
Founder of Powerhouse Electronics. For more info goto: www.ph-elec.com