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 (4)
  1. Pedro Ferreira says:

    Some time ago I was searching for development boards like that and I found this one:


    It is still on my waiting list so I can’t verify the quality but the features are quite impressive. Quote from the site:

    "The TINI platform is a microcontroller-based development platform that executes code for embedded web servers. The platform is a combination of broad-based I/O, a full TCP/IP stack, and an extensible Java runtime environment that simplifies development of network-connected equipment."

    So it has a network interface, can work as a server and supports assembly, c and java!

    And thanks for making a post on this subject.

  2. Jeff Parker says:

    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.

  3. John says:

    "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!

  4. We have another easy to program microcontroller which is programmed in Basic. We have a complete development environment in one chip which only requires a terminal or terminal emulator. The compiler, statement editor, lister and execution package are all embedded in the microcode.

    We support programs with up to 28K of Basic code and upto 2k bytes of data space. The 28K can be used to store multiple programs up to that 28K limit.

    We have CIMs (code interface modules) to access LCD displays, cross point keyboards, two-wire interface chips and infrared remote decoding. Specialized CIMs are also available to handle DMX-512 (theater lighting), multi-tempo metronomes and rotary encoders. CIMs can be user generated and loaded into the main program. Up to 16 CIMs can be loaded at a time. CIMs can load interrupt pointers and service special interrupts.

    We support integer and string variables directly and have a floating point (BCD not IEEE) package with all the usual features.

    The EEBasic chip (our name) is based upon the Atmel ATMega644 chip and operates at 16 mHz. All of the chip features can be accessed directly. Since the IDE is actually in the chip, there is no particular development system required. We run with the basic telnet tools found on PCs, MACs and Unix Style systems.

    We have a small ‘get to know you’ board with an LCD Display, 4X4 Keyboard and 4 relays with a small develop area for your circuit. In our tests, we are able to interpert around 10,000 statements per second but this does vary with statement complexity.

    Debugging is simplified since any program can be stopped (by keyboard character or stop statement) and all variables are available for examination (and modification!). Programs can be modified and restarted with all variables maintaining their current value.

    The Mega644 has 32 available I/O pins (4 8 bit ports). We have plans (down the road) to provide EEBasic in larger Atmel chips which will provide more program space (64K), data space (6K), more I/O pins (86).

    If we can provide you with a prototype board for your examination, please let us know.

    Thanks for your time.

    Andy Miyakawa

    Development Manager

    Dandy Solutions


    404 406-1478

Comments are closed.

Skip to main content