Partager via


Have Fun Programming Microcontrollers

I've spent over 26 years writing software. In that time, I've authored many programs that interact with hardware and external devices. But, it has been a long time since I've worked directly with microcontrollers, and even the little experience I've had has been very limited.

Some time before the New Year, a user group friend from Michigan asked me if I had any recommendations for learning microcontroller programming. While responding to his e-mail query, I was reminded of Parallax, Inc., a company I'd run across in my past. So, I spent some time digging through their site and many others and decided to put one of the Parallax starter kits on my Christmas list. I was thrilled when I ripped open one of the gifts from my dad and his wife Terri: a brand new BASIC Stamp Discovery Kit!

I won't go into all the details, because you can find a lot of great information on the Parallax site, and I'd encourage you to spend some time there. The kit includes an excellent 333-page introductory book called What's a Microcontroller that was written specifically for the Parallax starter kit hardware. The book starts by covering the basics of a microcontroller, helps you install and configure their computer-based IDE, and by page 24, you've already written the canonical "hello world" program that sends debug information via serial/USB back to their IDE. Pretty cool stuff.

Step-by-step, the well-written text leads you through lessons that carefully build your knowledge. Don't worry if you've never taken an electronics class. The text covers just enough to gain a basic but working understanding of the circuits that you're constructing. The starter kit includes all of the electronic components you'll need (resistors, buttons, LEDs, servos, etc.) to work through all ten chapters. You'll start with blinking LEDs, add buttons, control servos, connect a 7-segment display, measure light with photoresistors, create sounds with a speaker, and integrate of lot of the learning into a final project. I'm about two-thirds of the way through the book, and I'm having a blast.

The kit includes a 500-page BASIC Stamp Syntax and Reference Manual, and if you've ever written anything in BASIC, you'll be productive immediately (they call their variant PBASIC). I'd love to program this thing using a modern language like C#, but frankly, PBASIC is a breeze, and it's more than adequate for programming their microcontroller. If you've never used BASIC before, you'll have no problem learning as you go. The author has integrated the language education seamlessly with the rest of the text.

Of course, if you want to take your learning even further, Parallax provides projects and kits that increase in complexity all the way up to building your own sophisticated robot. If you do decide to dive-in and purchase the BASIC Stamp Discovery Kit, I'd recommend the recently-available USB version, and be sure to order the 9V DV Power Supply. It'll make your life a lot easier.

Highly recommended!

Comments

  • Anonymous
    January 31, 2006
    The comment has been removed

  • Anonymous
    February 01, 2006
    Good post Mike,

    I got the PBasic one with the USB option. I love it and have had a lot of fun with it. It was definately a good call. I also had to laugh, I knew I kept all those books on Basic around for a reason (wonders when my SCO Unix 3 books will come back into use). Of course I had dig through a few boxes and dust them off but still I had a treasure trove of old Basic resources. I have been having a blast with it and I am thinking about buying some additional sensors from them to play with as well. They have some cool robotic kits that caught my eyes as well. Definately made my Christmas break and vacation go by quick.

  • Anonymous
    July 25, 2007
    "I was thrilled when I ripped open one of the gifts from my dad and his wife Terri ..." Hmmm. Seems like Mike's a child of a broken marriage--poor guy--no wonder he needs some fun. Otherwise, that's a very strange way to talk about one's parents!

  • Anonymous
    October 29, 2008
    The comment has been removed