Friday, January 14, 2011

Chapter 5 - Experiment 36

I never could get my alarm system (Experiment 20) to work as planned, so I wasn't quite sure how to handle this last exercise. I've read over it 3 or 4 times, trying to understand the theory behind it... and it makes total sense.

What I find interesting about this experiment is the how much of the circuit from experiment 20 goes away when you bring in the PICAXE chip... letting the chip handle the logic rather than all those logic chips just makes sense from both a cost perspective and a losing-my-sanity one.

Take a look at page 201 at the circuit for Experiment 20... and then jump to the bit of code that allows the chip to determine if 7-4-1 has been pressed. It's a subroutine that's called by the code on page 313...and flashes of BASIC programming started flitting through my head. I was pleasantly surprised at how I understood the code and the logic behind it. Although I haven't rebuilt the alarm, it would be a rather simple matter to gut the box and recreate the alarm using just the PICAXE chip.

Some of you (myself included) may be wondering 'Why didn't the author save the alarm project for the PICAXE section of the book?' and, of course, I totally understand the reasoning - having worked through Experiment 20 and understanding how those logic chips work, I can both appreciate the power of MCUs and the author's making us go that route and doing it "the hard way" first.

1 comment: