123 PIC Microcontroller Experiments Book

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
Newz2000
Posts: 507
Joined: Wed May 18, 2005 1:01 am
Location: Des Moines, Iowa, USA
Contact:

123 PIC Microcontroller Experiments Book

Post by Newz2000 »

I recently had a birthday and I received some money to spend at Amazon. I picked up a few books, one of which was about electronics. The book was titled, 123 PIC Microcontroller Experiments for the Evil Genius, by Myke Predko (also available in N&V book store).<p>I am really pleased with the quality of this book. As many have found out, learning the PIC microcontroller (mCU) involves, a: learning the hardware, b: learning the programming and maybe even, c: learning electronics.<p>This can be quite a barrier to entry for some people and Myke does an excellent job of easing this problem by formulating this book as many short, simple experiments that incrementally build upon knowledge learned previously.<p>He starts out with experiments that aren't experiments but are really introductions to the development tools and the PIC mCU platform. Throughout the book an emphasis is put on good design habits and early on he demonstrates techniques that will make the future development of large projects easier. A very thorough explanation of the MPLAB debugger is given, including several "experiments" which do nothing but explain how to see what's going on through the debugger.<p>Once you begin designing PIC applications, the C language is used, since its syntax is a little more like English than the commonly used assembly language. This allows new developers to focus on the hardware platform. Once several foundational experiments have been worked through, Myke begins teaching the use of Microchip's easy to learn (31 instruction) assembly language.<p>The hardware platform used is the well designed and well built Microchip PICKit 1 Flash Starter Kit, which is a USB device that acts as the programmer and test board. The book focuses on the 14 pin 16f684 mCU, but also uses the 8 pin 12f675 mCU on a few of the projects. While these microcontrollers are not the most feature packed in the PIC lineup, they do allow an excellent variety of projects and offer a number of useful features. The 16f684 is the highest end product supported by the PICKit 1 programmer, but the package as whole works exceptionally well, allowing budding developers to focus on the mCU and software aspects of design with no need wasting time figuring out how to get the individual components working together.<p>The PICKit 1 flash starter kit is very affordable, costing only $36, and as a bonus, the book contains a 20% discount coupon on the last page. Please note that your kit probably does not come with the 16f684 mCU, so order one of those in addition to your starter kit.<p>Some interesting experiments performed while working through this book include the use of 7 segment LED displays, PC to mCU communication and LCDs using the standard 8bit protocol, 4bit protocol and even a unique 2bit protocol. Additionally you will create a digital "piano", various sensors are used, and learn to control several types of motors, including a DC motor, servo motor and a stepper motor. The final group of projects convert a miniscule ZipZap remote controlled car into an autonomous line-following robot. I can't wait to do this experiment; I was even fortunate enough to purchase one of last year's zipzap cars on clearance for $12.50!<p>If I were going to gripe, and I really try not to, my biggest complaint is that a number of miscellaneous components are needed to perform the more advanced experiments. This is extremely frustrating if you have to wait 4-5 days to get the parts. It would be nice to have a consolidated parts list so that I could make one order to a discount parts company and get all of the parts.<p>One final note is that electronics fundamentals and theory are not explained in detail. Everything you need to know to build the example circuits is included in the book, but there is not a lot of explanation about the theory of operation outside of the mCU and code.<p>I highly suggest picking up this book if you would like to venture into the world of Microchip PIC microcontrollers.<p>[ September 22, 2005: Message edited by: Matt Nuzum ]</p>
paulsantangelo
Posts: 75
Joined: Mon Aug 29, 2005 1:01 am
Contact:

Re: 123 PIC Microcontroller Experiments Book

Post by paulsantangelo »

Nice review, But since you've been through the book, perhaps you can come up with the parts list. I am interested in PIC only if I can get 8 outputs high similtanously. Do you know if thats possible?<p>Thanks-paul
Newz2000
Posts: 507
Joined: Wed May 18, 2005 1:01 am
Location: Des Moines, Iowa, USA
Contact:

Re: 123 PIC Microcontroller Experiments Book

Post by Newz2000 »

<blockquote><font size="1" face="Verdana, Helvetica, sans-serif">quote:</font><hr>Originally posted by paulsantangelo:
Nice review, But since you've been through the book, perhaps you can come up with the parts list. I am interested in PIC only if I can get 8 outputs high similtanously. Do you know if thats possible?<p>Thanks-paul<hr></blockquote><p>Yes, it certainly is. But don't use the processors outlined in the book for your 8 bit project. The book uses smaller cpus. Here are the CPUs I recomend to people, based on my own experience:
small/cheap: 12f675
medium/cheap: 16f628a
medium/full-featured: 16f88
large/full-featured: 16f677a<p>The last three CPUs I listed there all have 16 or more i/o pins, although on the two medium cpus some of those 16 are special purpose and can only be used as outputs. They are grouped into two 8 bit ports.<p>The 16f677a has 31 i/o pins and you could easily use that cpu to turn on any arbitrary 8 output pins based on the reading from 8 input pins.<p>I have created a circuit that used all 16 i/o pins on a 16f88. It's a very nice general purpose chip. Just note that one or two of those pins in port A are special and need to be configured properly.<p>[ October 24, 2005: Message edited by: Matt Nuzum ]</p>
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: 123 PIC Microcontroller Experiments Book

Post by philba »

I would recommend people use the 16F88 anywhere that they would use the 16F628 (A or non-A). It's about $1 more but the F88 can support a boot loader. I built several projects based on the 628A and then when it came time to update the program I had to tear the equipment apart to do it. More recently, I've used the F88 and all i had to do was plug in my laptop and boot load the new code. man, what a difference! I just wish microchip had made the F88 pin compatible with the F628 - that would have really been nice.
Newz2000
Posts: 507
Joined: Wed May 18, 2005 1:01 am
Location: Des Moines, Iowa, USA
Contact:

Re: 123 PIC Microcontroller Experiments Book

Post by Newz2000 »

I didn't say this in my reply, but the only reason I recomend the 628a is because it seems to be code compatible with the '84. I've grabbed a few scripts off of the internet for the '84|'84a and run them on the 628a with the only change being the config line and that type of thing. (Maybe there was one other change too, but it's been a few months and don't remember exactly)<p>I'm not sure you can do that with the 88, but I haven't tried. It seems though the '88 has a few more changes. But from my own personal experience, I've found the 628a to be a good safe upgrade from the '84.
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: 123 PIC Microcontroller Experiments Book

Post by philba »

the 628 to 88 differences aren't major. ANSEL needs to be set to zero (just like the 675, as you know) and the config bits are a little different. the biggest one, pin-wise, is that the TX and RX pins are different. No change to code using the uart, though. I regularly move code developed for the 628 to the 88 with no changes (C and ASM) other than setting ansel to 0.<p>The 88 has a lot of other features that put it well above the 628 - better/faster internal osc (up to 8 mhz), more flash/eeprom/ram, better uart (incl spi and i2c), lower power consumption, faster programming. and, as I mention before, self programming of the flash so boot loaders can be built. If you put the ansel = 0 line in the boot loader, most if not all 628 code should just work.<p>Did I mention I like the F88? :D
User avatar
Michael Kaudze
Site Admin
Posts: 16300
Joined: Fri Nov 22, 2002 1:01 am
Location: at work
Contact:

Re: 123 PIC Microcontroller Experiments Book

Post by Michael Kaudze »

If you liked that book you should check out the other evil genius books. The series is probably McGraw Hill's best series out!

Coming Soon (early 2006)-
*Solar Energy Projects for the Evil Genius
*Bionics for the Evil Genius
*50 Model Rocket Projects for the Evil Genius
*MORE Electronic Gadgets for the Evil Genius
*Electronic Sensors for the Evil Genius
Intelligence is the ability to adapt to change. Stephen William Hawking.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot] and 63 guests