XGameStation Game Console Starter Kit, Lesson 5
Hey! It’s microcontroller “Hello World!” How fun is that? The labs for lesson 5 introduce the student (that’d be me in this case) to the fundamentals of working with a microcontroller. That is, hooking it up to power and ground, building its programming circuit, and using its programmer tools to load a binary onto it. There are three labs in this one; all are essentially flavors of the same fundamental lab. The easiest one delivers you some blinkenlights (pictured below). Another demonstrates use of the microcontroller as a seven-segment display driver. The final one is a sort of crude one-dimension pixel game played with some LEDs and a pushbutton.
It’s great to finally feel like I’m getting to the meat of the project, that is, using a microcontroller to do things. All in all, these lessons are fun and definitely produce an air of excitement. There’s nothing quite as much fun as plugging in the programmer key and watching it all work. I also can now definitely understand the author’s choice in microcontroller (the Parallax SX). It’s very easy to program and its debugging is easy to control. It’s a good beginner’s chip.
Of course, inevitably, I have to mention what seem like the road blocks to learning. Both of these are minor complaints and should be taken as such. The first is that I don’t think enough attention is paid to what could possibly go wrong. Specifically, this is the first lab in the entire kit that both has a large number of “moving parts” and which also carries the warning about how easy it is to break some of them (like the SX Key). This lesson could greatly benefit from some material on how to debug common problems safely. In my case, I had a problem with my programmer circuit. The result was that the SX Key Editor could sense the SX Key and would attempt to program the microcontroller, but would then die complaining “Could not create VPP”. I knew the problem was with my programmer circuit, but the error didn’t give me much to go on and there wasn’t much help to be found through web searches, since most of the material I found was about having oscillators on the same line as the programmer pins for the microcontroller. I eventually decided to dissect the programmer circuit, and finally found that I’d accidentally run a wire to the wrong pin. Lesson learned, of course, but it would have been a huge help to even see the lab materials contain information about common errors you can encounter and what you should check. It’s nice to feel like you’re not completely out in the weeds on your own.
My other complaint is that the author provides sample code sufficient for the student to finish the lab without digging into SX assembly at all. In fact, it brushes it aside as unnecessary to have because there’s plenty of information out on the Web. I understand the author’s perspectives and priorities here, but there’s plenty of information on basic circuit theory on the web, too, and that got 4 dedicated lessons, each with several labs in them.
I’m going out on a limb here, but I used to teach so I feel qualified being out here. Teaching programming by dissection is a pedagogical failure. It’s roughly the equivalent to learning Japanese by listening to the same handful of J-pop albums over and over again. You learn the songs, sure, but you don’t know Japanese. Seeing how a functioning program works isn’t the same as learning how to build one on your own, and it generates little more than a shallow parroting of known idioms. Is sample code essential to a learn-at-home kit? Absolutely. What’s also essential, though, are extra labs without code that push the student through writing code on his/her own.
That said, the lesson achieves its effect, which is to get your feet wet with the microcontroller and drills into you the most important rule of working with a new microcontroller — do not do anything before you first get power, a programmer, and a blinking LED to work. That’s “Hello world!” and it’s essential to do it every time. If you don’t, you’re just asking for trouble. I can deal with this. It’s pretty common for me to write a “Hello world!” for every driver, service, and application, proving first that I at least have the boilerplate structure right. It’s good to see someone teaching this responsibly.
Oh! You’ll notice an extra LED in this photo, off to the left. That’s not part of the lab at all. Basically, the barrel connector I was sent is mildly defective and sometimes the wall wart doesn’t make enough contact, causing issues. I got tired of constantly testing to see if I had a power supply problem, so I put an extra LED on to let me know that the power’s on. I also added a simple switch so I could turn the power on and off without unplugging the wall wart. It’d be nice to see these added to the labs in general. It’s convenient and easier on your parts.

