Square 1 PIC Books

Books reviewed 2004.09.18 thru 2004.09.19, with updates throughout


cover image

Easy Microcontrol'n (formerly Easy PIC'n)
Version 4.0
by David Benson
Square 1 Electronics, 2002
178 pages, softcover
$29.95 direct from the publisher

This book tries to keep things simple, though not as simple as in the Smith book. This is partly because there are four other books in the series (see below), so the author can refer to them at need.

The book uses only the popular PIC16F84A in its examples. If you want information on the other devices in the family, you need to refer to another book, or to the chip's datasheet.

I like the projects in this book; most are just toy programs, but since there are many of them, they can slowly build up the concepts in PIC programming a bit at a time. Like the Smith book, the first program appears early in the book. There are only three different circuits used in the book, but over a dozen of the programs use the first circuit, which is simple but flexible.


cover image

Microcontrol'n Apps (formerly PIC'n Up the Pace)
Version 2.0
by David Benson
Square 1 Electronics, 2002
437 pages, softcover
$44.95 direct from the publisher

I found this book to be much more useful than Easy Microcontrol'n. Almost everything in it is novel relative to the other PIC books I've read.

The first section covers rudimentary serial I/O (i.e. not RS-232). This includes sending serial data to and from 74-series serially-addressable latch chips (useful for conserving precious I/O pins), sending data to serial EEPROMs, and sending data to another PIC.

Next comes a section on sending output to an LCD module, and one on getting input from a matrix keypad. These are a great step beyond the "switches and LEDs" stuff you got in the first Benson book.

After that, the book covers analog to digital conversion, and vice versa. In addition to the obvious coverage of the A/D conversion built into several PIC family devices, the book covers outboard A/D chips and several D/A methods (some involving external ICs, some involving only passives). Some of the demonstrations are done with toy circuits (a ramp generator, for instance), but there are some practical items here, like temperature sensor conversion and offset-and-scale circuits.

Skipping over the short section on comparators (there's not much to say about them, is there?) the next major section covers things like multibyte arithmetic and binary to BCD and back conversions. One could want more sophisticated versions of these routines, but these are useful and understandable.

Given all these pieces, the author then builds up several practical projects: a digital thermometer, a voltmeter, a PIC that communicates with a PC via standard RS-232, and a data logger. One could swipe a lot of reusable code from these projects.

The next section of the book gives comparative information on several other mid-range members of the PIC family. Mainly this is to give you an idea of what it takes to move code from one device class to another, but it also serves as an introduction to several of the more useful devices in the family.

Finally, the author covers the Microchip In-Circuit Debugger. If you can tolerate the cost ($200 or so) and its limitations, this looks like an interesting middle ground. The only cheaper option is pure software simulation, which MPLAB will do, but it doesn't simulate the real world aspects of the circuit very well. And to get beyond the ICD's limitations, you have to step up to the $1600+ Microchip ICE products.


cover image

Time'n and Count'n (formerly part of PIC'n Techniques)
Version 2.0
by David Benson
Square 1 Electronics, 2002
218 pages, softcover
$34.95 direct from the publisher

I found this book useful, but not very interesting. The sexiest projects in the book are the frequency and pulse generators and the interval and frequency counters. Yeah, exciting, I know. I suppose if your test bench doesn't include these already, and you need them, they'd be worth building.

The rest of the book is almost reference-like in the way it catalogs various techniques for timing and counting things. It's good to know I have this catalog on my shelf, but it was pretty dull reading.

Like the first book, this one uses a single set of flexible circuits to assemble most of the projects. I do like this style, since it minimizes the number of circuits you have to build to play with the code. I just wish there was something about the projects that made me want to build these circuits in the first place.

The book uses the PIC16F84A for the simpler examples, and the PIC16F870 for the more complicated projects.


cover image

Easy Step'n
Version 1.0
by David Benson
Square 1 Electronics, 2001
199 pages, softcover
$34.95 direct from the publisher

This is the most fascinating book of the set, to me at least. No doubt that's partly because I knew nothing about stepper motors going into it, so everything was new to me. But also, I think the fact that it keeps things simple came through clearly. Stepper motors have the potential to be a very difficult subject. Can you say "nonlinear analog electronics"? I knew you could...

This book is hard-as-nails practical. There isn't a bit of theory in it that isn't put to practical use, and there's a good bit in here that a theory-oriented text wouldn't mention. Things like how to test a motor's torque using only a homemade boom and a set of fishing sinkers...how to choose which parts to keep and which to ignore when scavenging...how to calculate the inertia of all the spinning parts in your design, to decide how much torque you need...and how to hook up an 8 wire stepper motor to a circuit made for 5 wire control when you don't have the datasheet.

I'm sure this book leaves out some juicy technical details, but even now, having just finished the book, I feel that I could make functioning projects without any more study.

There are lots of good circuit building blocks and code in this book. Things you wouldn't care to write yourself. In fact, almost every program in this book I can think of has a serious, practical use.

There is one not-so-serious project in the book: he removed the guts of an old printer that was missing its print head, strapped a ball-point pen onto it, and turned it into a poor-man's X-Y plotter. :) Fun, yes, practical, no.

This book is three years old now, so it uses some devices that have been replaced since publication. The 16C711 is still available, but the newer 16F716 is cheaper and is a flash device. Similarly, the 12C671 was mentioned in passing, but a revised edition should mention the 12F675 instead. (I could argue that the 16F84 is has also been replaced, but it's so wildly popular that I can't fault the author for continuing to use it.)

Throughout the book, Benson tries to remain microcontroller-neutral, no doubt in a bid to broaden the audience of the book. Yet, the only information for specific microcontrollers is for PICs. He uses generic terms instead of Microchip preferred ones: register instead of file, accumulator instead of W.... And, he addresses the PIC crowd in the text as though they're a side issue to the text's main thrust: "...you PICmicro folks..." (What, did he forget to write the paragraph for "you 87C51 folks"?) The text would be better if PICs were treated as a first-class citizen to match the status given in the code and circuits. If the author wants to make accommodations for other micros' terminology as an afterthought, that's fine with me. They're the ones on the outside looking in here, not the other way 'round.

Speaking of market-broadening sops, the book covers interfacing stepper motors to PCs...in three quarters of a page! Basically, it says, "Here's some languages you could use, and a vague block diagram of the circuit, but I wouldn't do it, so we now return to our PICmicro assembly language program." This is a useless page.

Matters of Style

These books are self-published. This means no prose editor touched the text, no graphic artist drew the illustrations, and no typographer set the text. They look like something Bob in Engineering wrote and had printed up at the local business-grade print house. Bob's a nice guy, but there's a reason he's not Bob in Technical Writing.

For want of an editor, these books frequently get parenthetical, repeat themselves, perpetrate grammar errors, and fail to string thoughts together in the most succinct manner. Consider this specimen from Easy Microcontrol'n:

The EEADR register is capable of addressing a maximum of 256 locations, but only the first 64 are used. Only 6 of the 8 bits in the register are used. Bits 7 and 8 are not decoded. The usable address range is 0x00 to 0x3F.

The first sentence is useful. The rest are passive-voiced statements of the obvious stemming from the first. Strunk and White would have had a fit.

Suppose your brain isn't turned to pudding after plowing through the prose. Suppose further you read something interesting and want to look up more information on that topic in the index. Sorry, there is no index. For that matter, there are no section numbers, and no internal references within the books. You'll do a lot of skimming when referring to these books.

As for the illustrations, I found a single exemplar in Easy Microcontrol'n that shows almost all of the graphic problems in these books at once:

David Benson's 'art'

See how the line from the output port doesn't quite meet the inverter? And how the vertical line to the left of "06" thins out? And how the line coming out of the inverter doesn't quite meet the line going up to the resistor? And how a non-standard resistor symbol was used? And how the heavy dot at +V isn't quite round? Yes, friends, every one of these problems is actually in the book, and they affect virtually every illustration. The latter two problems are apparently because the author couldn't figure out how to get his drawing program to do certain things, because they appear hand-drawn; instances of each vary throughout the books.

The final problem is the poor typography. The books are typeset in the top three most overused faces of all time: Helvetica, Times Roman and Courier. The pages are 8.5" by 11" with standard word processor margins. The quotation marks are single-stroke spikes. There are no horizontal rules to break the page up, and everything's hard left-justified. I call this the Business Blah esthetic.

The Bottom Line

I cannot recommend Easy Microcontrol'n unless all of the other PIC books reviewed here are unavailable to you. If you want a single, simple book, I'd recommend the Smith book instead. Even counting the fact that Easy provides some information that the Smith book doesn't, I think I'd rather have the superior production values of the Smith book.

As for the other books, if it sounds like one of these books covers something you need to know about, you can probably get enough out of it to be worth tolerating the below average presentation.

Related Resources

The Square 1 Electronics page has information about these books, and source code for the more advanced examples. (They deliberately don't provide the simple examples' code so you become familiar with MPLAB's warning and error messages through your typos.)


This article is copyright © 2016 by Warren Young, all rights reserved.

Updated Sun Jan 18 2015 04:24 MST Go back to Electronics Book Reviews Go to my home page