PICAXE Implementation

While the CMOS implementation is relatively compact, and reasonably reliable (certainly moreso than one built entirely out of transistors), it is still pretty busy. You have 3-4 components required to make up a clock circuit to trigger your flip flops, several more to serve as the input signals to your CMOS logic circuit (a J/K master-slave flip flop in the previous example), along with several other supporting resistors, capacitors, and other miscellaneous pieces. Its alot... and addition of the override logic would have required even more.

Enter the late 20th, early 21st century, and the advent of Programmable Integrated Circuits (PICs). We have at our disposal many integrated circuit packages that can be programmed to do exactly what you want, within certain constraints. Many require some low-level language like assembly, however high-level language implementations are now available (even Object-oriented, in some cases). After some reading, I settled on trying out one from Revolution Eduation Ltd. called the PICAXE chip series. These little wonders are relatively inexpensive (<$10/ea) and offer a wide range of capabilities in one tiny, compact package. Code is written in BASIC, compiled, and downloaded all within the programming editor application. Having some measure of BASIC programming experience (snicker), they were ideal for my circuitry pursuits.

Compare the circuit in the CMOS implementation with the following one:

Grant logic implemented in a PICAXE chip

Gone are the 4047 clock circuit, the transistor NOR gate, and the 16-pin CMOS 4027 J/K master/slave IC. We have effectively eliminated the need for:

Now there are some things between the power supply and PICAXE chip that are unnecessary once the BASIC program has been downloaded - those two resistors (a 22K and 10K), the stereo jack connector, and the associated jumper wires are all unnecessary and can be removed (unless you need to update the program again!!). So we have taken the 10 components listed above and condensed that functionality down into:

Now admittedly, if you sum up the cost for all of the components you just eliminated, they will still probably come out a hair less than the cost of the PICAXE chip, AND they don't require the other peripheral devices \ (download cable, etc) that just add to the overall expense, however they sure do make for a nice and compact circuit. I also have not bothered to put in the relay switching transistor, signal diode, and relay in the circuit above and have used just the green LED to indicate the output state.

The PICAXE BASIC code that implements the grant logic with override functionality is listed below:

That compiles down to a measly 41 bytes out of the 08M's available 256.

As you can see, these little ICs are amazing - and this is only the most basic of applications for them. In addition the PICAXE chips have the ability to send data to many places (including a computer) using the native serial out functionality - For this particular example, that is not possible as we have consumed all of the possible inputs and outputs. If we stepped up the 8-pin IC to the PICAXE-18, 18A, or 18X (~US$5-8), we would have significantly more inputs and outputs at our disposal, and could even take 10-bit temperature readings using a temperature sensor like the LM34 linear temperature sensor from National Semiconductor.

As you can imagine, I may end up basing much of my data acquisition scheme on these magnificent little chips, and they will certainly appear within some of the circuitry driving my homebrewing sculpture.