Programming and Customizing PICmicro Microcontrollers

Home

Programming & Customizing PICmicro Microcontrollers

Prev Book  Next Book

More books in category: Programming

by: Myke Predko


AMAZON multi-meters discounts AMAZON oscilloscope discounts


Topics include: nop movlw, configuration fuses, retlw instruction, execution change instructions, assembler calculator, conditional assembly statements, file register address, bondout chip, decfsz instruction, tris instruction, switch matrix keyboard, instruction holding register, brown out reset, program memory word, four instruction cycles, bank select bits, processor control instructions, parallel slave port, interrupt handler code, clrwdt instruction, task information block, mainline code, bit banging, interrupt request flag, hex file format

CLICK HERE for more information and price

Review Using the PICmicro(R) family of microchips as examples, electronics writer Predko explains microcontrollers, programming languages, and programming. The author does assume his readers have some prior education or experience, and his technical text may require some additional reading. The CD-ROM includes source code, two sample operating systems, and HTML interfaces. Book Description This book is a fully updated and revised compendium of PIC programming information. Comprehensive coverage of the PICMicros' hardware architecture and software schemes will complement the host of experiments and projects making this a true, "Learn as you go" tutorial. New sections on basic electronics and basic programming have been added for less sophisticated users along with 10 new projects and 20 new experiments. New pedagogical features have also been added such as "Programmers Tips" and "Hardware Fast FAQs". Key Features: * Printed Circuit Board for a PICMicro programmer included with the book! This programmer will have the capability to program all the PICMicros used by the application. * Twice as many projects including a PICMicro based Webserver * Twenty new "Experiments" to help the user better understand how the PICMicro works. * An introduction to Electronics and Programming in the Appendices along with engineering formulas and PICMicro web references.

Superb, comprehensive, but too many errors OVERVIEW: This book is a detailed and comprehensive discussion of the three categories of PIC micro MCUs (low-, mid- and high-end). At over 1,000 pages, the book covers the products in (sometimes very technical) detail. It's an excellent resource for microcontroller beginners, as well as those with micro experience but are new to PIC. The book provides excellent descriptions of how the PIC MCUs work, including details about their instruction sets, hardware features, tips for assembly language and macro development, and a slew of interesting experiments and projects. ADD-ONS: The book includes a CD and a PCB (printed circuit board). The CD contains project code, additional information, data sheets, and even an entire chapter (presumably left out of the actual text because it's already quite lengthy) that provides an excellent introduction to electronics. It (the extra chapter) covers all the basics, and segues into PIC-related electronics issues. The chapter, for example, provides an excellent power supply circuit for PIC experimenting. The PCB is for the "El Cheapo" PIC programmer -- you need to purchase the components (which might be difficult to find), and then you can solder them up onto the included PCB and you'll have a working PIC programmer! IMPORTANT: Be sure you check the author's web site BEFORE ordering your parts -- I believe the parts list has been updated since the text was published. REFERENCE QUALITY: The book does not make a good reference -- partly because of the way it's structured. (You'll find yourself flipping pages quite a lot if you intend it as reference material.) It is, however, a quite comprehensive and logically organized as a textbook. As an example, the author goes into the why's and how's of the instruction set, rather than just copying a reference table from the Microchip datasheets. Included in the discussions are things to watch out for, optimization ideas, and tricks of the trade. There are also a good number of code samples, which illustrate techniques the author teaches. The index, contents, Appendices (10!) and supporting material on the CD-ROM are all quite good. ERORS, TYPOES, AND MI$TAKES: Unfortunately there are quite a few errors in the text. Careful readers, though, will catch most of them, -- but they're enough to get you scratching your head in confusion from time to time. If you read critically and experiment as you go, you'll probably do just fine -- just don't bet your job on any one sentence or code snippet. Where there are errors, they're usually typos. They're *not* the types of errors where the author is just dead wrong and thinks he's right. The book could have used a good, qualified technical editor. I like to consider the errors puzzles -- to keep me on my toes. =) TARGET READER: The text can sometimes get confusing, and is targeted at those with at least some technical education (though I'm sure a bright kid could learn from it, too). If you get stuck somewhere, just move on and come back to it later. This is not the kind of book you just read once then store on the bookshelf, and it's not the type you read through without ever turning back, either. COMPARED TO SIMILAR BOOKS: This book wins hands down. Take a look at "Programming and Customizing the AVR" to see what I mean. This text does not simply regurgitate information in the datasheets. It goes into DETAIL. For example, "subwf" isn't explained away as "subtract w from f", instead the text explains why this command is a bit different than others, and how it can be thought of to make more sense. BINDING QUALITY: The book is paperback and is bound in such a way that the pages will not turn and the cover will not swing closed when set flat - a great benefit when following along with experiments. Also, the binding has held up quite nicely and all the pages are held tightly in place, even after being left in a hot car all day. CONCLUSIONS: Four stars only because of the errors and because it's a poor reference. Otherwise, A+ all the way. Highly recommended, indeed.

Good Book: I am a professional embedded programmer. I purchased this book so that I could get up to speed on the Microchip PIC architecture and its assembly language. I read the first 105 pages of the book in detail so that I'd have a basic understanding of the PIC micro architecture for the mid-range family. (I acquired an MPLAB-ICD, from Microchip, which is based on the 16F877 -midrange chip.) Afterwards I went straight to the section in chap. 14 on the MPLAB-ICD and got the ICD kit running. After that, I went to chapter 15 and did the first 10 experiments using the MPLAB-ICD. Basically, the course that I followed allowed me to get up to speed in the shortest amount of time. Most of these experiments were designed for the 16F84 but they're all easily modified to run on the 16F877. My findings: 1. The book is sprinkled with spelling and grammatical errors, however so is the Microchip documentation on their chips - this is more frustrating because you're taking Microchip's word as absolute truth. 2. It is nice that Myke included the El-Cheapo programmer circuit board. However, given the time and cost associated with building it, I'd rather use the MPLAB-ICD. However (there's always a however) the El-Cheapo programs quite a variety while the ICD only does the 16F877. (Note: Microchip has a new ICD that programs all or most of their chips. It's low cost and is already built.) 3. Unlike other reviewers, I found the code that I ran to be reliable - I found no blatant errors in the code - errors that would keep the code from running "as advertised." I copied my code from the CD - this was a time-saver. 4. The book is way too long to read from cover to cover. I'd die of boredom if I tried to do this. When I was going through the first 10 experiments, I skipped to the earlier chapters to dig for information. This is a fact of life when programming microcontrollers. You typically don't read whole data books on a microcontroller. Fortunately, I found the Microchip data sheets to have most of the information I was looking for. This minimized my searches in Myke's book. 6. Myke should have provided a road map to assist people with different levels of experience get up to speed in the shortest time possible. 7. To be fair, the book was comprehensive and I was able to find answers to most of my PIC architecture/assembly questions. 8. The index is not easy to read. Take a look at it and you'll understand what I mean. Sometimes, I felt like I needed a magnifying glass. The topics and their subtopics are in the same small font and the subtopics are often numerous - sometimes extending to the next page. Myke, for the next edition fix this. 9. Chapter 13 has quite a deal of information on the YAP-II programmer. This information would have been better kept on the CD so as not to pack the book with too much information. 10. I am specifically interested in the electronic thermometer project on page 957. For my application Myke's approach is not adequate, however it may be fine for you. Regardless, I enjoyed seeing his approach and comparing it to mine. Myke uses a thermistor as part of an RC circuit which is charged to 5 volts. The capacitor is then discharged through the thermistor to a known voltage (2.5v) and the time constant for the circuit is determined from this. This measured time is directly related to the thermistor's resistance which is directly related to the temperature. After reading Myke's book, I implemented a 16 by 16 signed multiply on the 16F877. I used a least squares curve fitting program to derive a cubic equation for the thermistor's data (same one Myke used) and implemented this equation on the PIC using fixed point arithmetic. I used information in Chap 15 to get the serial port going - by cutting and pasting. I had a friend write a Visual Basic app to display the temperature on a PC. Armed with the PIC information from Myke's book, I implemented a temperature controller that can accurately hold the temp. in an oven to better than 2 Deg. F. (with minimal over/undershoot) and reports the temperature to a PC. The approach I took yields greater precision and requires less parts however Myke's approach is simpler. Maybe I'll write a book on this... I recommend getting this book if you want to get started with the PIC microcontroller - it's a good reference...

Reviews:

The best PIC book i've ever read: Would you like to program PICs? Do you already program PICs? If the answer of any of these questions is yes, then you have to BUY THIS BOOK. Even though the book have a lot of information for the beginners (like me), I have to say this is not a first microcontroller book, but, if you really want to learn to program PICs you have to buy it anyway, after you have some little basic knowledge about PIC microcontrollers you won't regret that you buy the book at the beginning. Myke Predko makes programming PICs an easy task, it provides all the necessary information to develop your own applications, not only he provide great programming techniques to make your code more efficient, he also give you suggestions on how to interface PICs with other devises, to give an example, I stared using LCD screens in just one day from knowing anything about LCDs, in the book he explains how to communicate with these devises following a few simple steps. The book cover almost all the PIC families from the little 12C508, touching the famous 16F84 up to the big ones 18CXXX.

Programming and Customizing PICmicro Microcontrollers: I cease to be amazed by the number of technical books of late that make such prodigious use of the first person ("I did this and I did that"). It really strikes a raw nerve with those of us who try to write serious useful technical publications. The book itself contains most of the information needed to begin the task of building and programming PIC micro projects, but the obnoxious proliferation of first person pronouns (as many as five in a given sentence) is extremely distracting. Shame on McGraw-Hill for allowing this kind of writing to go unedited. On the positive side, much credit needs to be given to Mr. Predko and people like him who can churn out over 1000 pages of reasonably useful information. And thanks so much for the "El Cheapo" printed circuit board. The CD, however, was a disappointment: In spite of repeated attempts on four different PC's, it does not work properly. I recommend this book as a good source of information for those who are embarking upon the world of PIC micros, if you can overlook the fact that the whole work could have been presented in less than 75% the amount of paper in a more robust style, had it been properly proof-read and edited.

Complete Guide on PIC! -- Astonishing! Couldn't believe it is the same author of "Programming and Customizing 8051 Microcontroller", which I think is not that recommended. He uses quite a big portion in his PIC book to elaborate on knowledge of PIC and other microcontrollers. He even covers introduction the IDE, computer interface, compiler, assembler, linker etc which is usually not mentioned in other PIC books. I'd say this book is good to intermediate PIC user and beginner of microcontroller. I guess beginner of PIC must be frustrated, as he/she still not be able to get the PIC works after finish reading half of the book. However, this book worth its price.

Riddled with errors: Just as bad as his 8051 book in the quality of the English. He probably knows how to program the PIC MCUs, but I couldn't stick around long enough to find out. The book desperately needs an editor, and the publisher should be ashamed of letting a semi-literate author get away with this. It reflects on them as much as on him. The bad grammar and spelling can distract one from the technical errors. And there are plenty of those, partly oversight and partly the author's own shallow understanding. Just opening at random to pp. 178-179, on clock oscillators I learn that "applications that require extreme accuracy allow the use of cheaper clock designs." How about "do not require"? Then I learn that "an error of 30% to the target speed are not unheard of." Sure, that's just English, but gee whiz, it's that way through the book. Then I learn that the circuit uses a "Schmidt trigger," presumably the German version of the well-known Schmitt trigger. Lower on the page I find "Crystals and ceramic resonators delay the propagation of a signal a set amount of time. This set amount is dependent on how the crystal is cut." If ever an author were asked to demonstrate that he hasn't a clue about how a crystal works, he couldn't find a better way. And so forth. It's that way on every page. He probably knows the PIC processors pretty well, and I won't take that away from him. One pass through the book by a competent copy editor, and another by a real electronic expert could easily turn this into a much shorter, coherent, accurate, and useful book, but neither of those has happened. All his books seem to have a strange combination of rave reviews and pans, with very little in between. That's unnatural, and the explanation that jumps to mind is bothersome.

Love the details, loathe the errors: This book is not for the newbie programmer or someone without experience in electronics. That being said, Myke's book is chock full of details and (mostly) great code snippets that will help the average hobbyist/professional in putting PICmicros to good use. Without prior experience in microcontrollers, but a strong background in electronics and programming, this book was able to get me up to speed very quickly. The down side? Good god, the errors! Please, Myke, I love your book and can see your depth of knowledge in the field, but you and your publisher need to get both a copy editor and a technical editor...IMMEDIATELY! My copy was published in December of 2000, and yet 18 months later neither Mcgraw-Hill nor Myke's website have any more errata than two files that were missing from the included CD. There are several errors in schematics that will guarantee a circuit to malfunction. Likewise there are code errors (most specifically the SIMPRS.ASM experiment - a start bit is a mark or 0, not a space or 1) that will also completely fail to operate as explained. The most damning errors are those that exist in the technical explanations; key explanations are sometimes obscured by horrible grammar and leave the reader scratching their head trying to understand what, exactly, the author was trying to say. Despite my complaints/screed, this book will remain on my shelf, and in fact will surely be as tattered as some of my other favorite references.

Previous Book  Books in category Programming  Next Book