PIC-FAQ This Version Produced: 05 Feb 1995 00:26:53 GMT Last Modified: 23 Jan 1995 16:16:16 GMT The following topics are addressed: 0 ) Index 1.0) ABOUT THIS FAQ 1.1) Who put this FAQ together? 1.2) How can I contribute to this FAQ? 1.3) What newsgroups will this FAQ be posted to? 1.4) Mailing lists of interest to PIC wranglers 1.5) Other FAQs of possible interest 1.6) Can I distribute this FAQ or post it somewhere else? 2.0) ABOUT THE PIC 2.1) The PIC micro controller 2.2) PIC variants 2.3) PIC contacts and representatives 3.0) PIC Utilities 3.1) FTP sites for the PIC 3.2) BBSs that support the PIC 3.3) Programming languages (3rd Party) 3.4) Programming hardware (3rd Party) 3.5) Programming Hardware (D.I.Y.) 4.0) PIC DOCUMENTATION 4.1) Periodicals that cover the PIC 4.2) Books on the PIC 4.3) Miscellaneous documentation on the PIC 5.0) Notes for programmers 5.1) Useful Code Routines [Index] 6.0) Attributions ------------------------------ 1) ABOUT THIS FAQ ------------------------------ 1.1) Who put this FAQ together? Many moons ago, on an internet far away, the cry went out out; "Lo, seekers of wisdom abound and verily there is a plethora of sources with information to impart, but alas, the references to the relevant incantations and significant associations of discrete components are widespread throughout the land and obfuscated by dissemination.... What we need is an idiot^H^H^H^H^H, er, champion to sally forth and tidy these Augean stables. [own shovel required]" Your humble scribe heard the cry and thought "Hey, while I'm gro wing this beard, I've got *bags* of spare time. I mean, not shaving must save *hours* a month. I'll give it a try." [Filed under..yet another triumph for enthusiasm over experience .] The boring version; I had been lurking on the PIC mailing list for a while, when Jory Bell asked if anyone would care to sort through the info he had archived and produce an FAQ file from it and I volunteered, thinking that as the list was relatively low-volume there would not be much involved. Hah ! Suffice it to say, that I've had to write a program to keep track of it all and weld[?] it into what you see before you. If you like it, good ! Drop me a line. If not, write and tell me what changes you would like to see. ------------------------------ 1.2) How can I contribute to this list? Please, if you have any suggestions corrections or additions, notify me by E-MAIL. : Tom@takdsign.demon.co.uk Thank you. ------------------------------ 1.3) What newsgroups will this FAQ be posted to? This FAQ will be posted to the following newsgroups: sci.electronics sci.electronics.repair comp.robotics comp.realtime sci.answers comp.answers news.answers Archive: rtfm.mit.edu : /pub/usenet/comp.answers/microcontroller-faq/PIC /pub/usenet/sci.answers/microcontroller-faq/PIC /pub/usenet/news.answers/microcontroller-faq/PIC And the PIC mailing list. The schedule for posting will be monthly ------------------------------ 1.4) Mailing lists of interest To subscribe to the PICLIST mailing list; Mail to: listserv@mitvma.mit.edu Header: () leave blank, not used. Text: SUBscribe PICLIST to subscribe or UNSUBscribe PICLIST to un subscribe or HELP to get help or INFO REFCARD for a listserve reference card The pic list address is: PICLIST@mitvma.mit.edu To receive the mailing list as a digest, send a message to the listserv@mitvma.mit.edu In the body of the message have the single line: SET PICLIST DIGEST ------------------------------ 1.5) Other FAQs of possible interest Other Microcontroller FAQs Subject: 8051 microcontrollers Newsgroups: comp.realtime comp.robotics sci.electronics Archive: rtfm.mit.edu : /pub/usenet/comp.answers/microcontroller-faq/8051 /pub/usenet/sci.answers/microcontroller-faq/8051 /pub/usenet/news.answers/microcontroller-faq/8051 Maintainer: Russ Hersch Email: sibit@datasrv.co.il Subject: 68hc11 microcontrollers Newsgroups: comp.realtime comp.robotics sci.electronics Archive: rtfm.mit.edu : /pub/usenet/comp.answers/microcontroller-faq/68hc11 /pub/usenet/sci.answers/microcontroller-faq/68hc11 /pub/usenet/news.answers/microcontroller-faq/68hc11 Maintainer: Russ Hersch Email: sibit@datasrv.co.il Subject: Microcontroller primer and FAQ Newsgroups: comp.sys.intel comp.realtime comp.robotics sci.electronics alt.comp.hardware.homebuilt Archive: rtfm.mit.edu : /pub/usenet/comp.answers/microcontroller-faq/primer /pub/usenet/sci.answers/microcontroller-faq/primer /pub/usenet/news.answers/microcontroller-faq/primer Maintainer: Russ Hersch Email: sibit@datasrv.co.il Additional FAQs of interest Subject: Robotics Newsgroups: comp.robotics Maintainer: Kevin Dowling (412)268-8830 Email: nivek@ri.cmu.edu Smail: Carnegie Mellon University The Robotics Institute Pittsburgh, PA 15213 Subject: Electronics Newsgroups: sci.electronics Comments: There are a number of FAQs available in this newsgroup on various subjects. Among some of the subjects covered are: LCDs, stepper motors, etc. FAQ subject: Real-time Newsgroups: comp.realtime, comp.answers, news.answers Archive: rtfm.mit.edu : pub/usenet/comp.realtime Maintainer: Mark Linimon Lonesome Dove Computing Services Roanoke, Virginia Email: linimon@nominil.lonesome.com. Subject: Motorola 68K microprocessor line Newsgroups: comp.sys.m68k Archive: bode.ee.ualberta.ca : pub/motorola/general ftp.luth.se : /pub/misc/motorola/faq file name of archive is m68kfaq?.zip (? is version) Maintainer: Robert Boys - Ontario, Canada Email: r.boys@genie.geis.com or fboys@uoguelph.ca For more information on various microcontrollers and their features, refer to the Microcontroller primer and FAQ listed above. ------------------------------ 1.6) Can I post this FAQ to my local BBS? I am putting no restrictions on the use of this FAQ but please, * * * * * * * * * SEE COPYRIGHT NOTICE AT END OF FAQ * * * * * * * * * * * REMEMBER ! If you choose to upload this FAQ to any BBS or ftp site, then *YOU* are responsible for updating it regularly. Otherwise, I'LL TELL YOUR MOTHER WHAT YOU DID !! ;-) ------------------------------ 2.0) ABOUT THE PIC micro controller The PIC series are eprom based 8-bit micro controllers developed by Microchip Technology ------------------------------ 2.1) The PIC micro controller Back in 1965, GI formed a Microelectronics Division, and indeed used this division to generate some of the earliest viable EPROM and EEPROM memory architectures. As you may be aware, the GI Microelectronucs Division were also responsible for a wide variety of digital and analog functions, in the AY3-xxxx and AY5-xxxx families. GI also generated a 16 bit microprocessor, called the CP1600, in the early 70s. This was a reasonable microprocessor, but not particularly good at handling i/os. For some very specific applications where good i/o handling was needed, GI designed a Peripheral Interface Controller (or PIC for short), in around 1975. It was designed to be very fast, since it was i/o handling for a 16 bit machine, but didn't need a huge amount of functionality, so its microcoded instruction set was small. Hopefully, you can see what's coming....yes, the architecture designed in '75 is substantially the PIC16C5x architecure today. Granted, the1975 version was manufactured in NMOS, and was only available in masked ROM versions, but still a good little uC. The market, however, didn't particularly think so, and the PIC remained designed in at a handful of large customers only. During the early 80s, GI took a long hard look at their business, and restructured, leaving them to concentrate on their core activities, which is essentially power semiconductors. Indeed they are still doing this very successfully now. GI Microelectronics Division became GI Microelectronics Inc (a wholly owned subsidiary), which in 85 was finally sold to venture capital investors, including the fab in Chandler, Arizona. The venture capital people took a long hard look at the products in the business, and got rid of most of it - all the AY3- and AY5- parts and a whole bunch of other stuff, leaving the core business of the PIC and the serial and parallel EEPROMs and the parallel EPROMs. A decision was taken to restart the new company, named Arizona Microchip Technology, with embedded control as its differentiator from the rest of the pack. As part of this strategy, the PIC165x NMOS family was redesigned to use one of the other things that the fledgling company was good at, i.e. EPROM - the concept of the CMOS based, OTP and eraseable EPROM program memory PIC16C5x family was born. Contributed by Alex R. Baker Actually, the PIC architecture was first integrated by Signetics for a company in San Jose (Scientific Memory Systems as I recall) using Bipolar technology and dubbed the 8X300. Prior to that, the architecture had been a scientific curiosity since it's invention by Harvard University in a Defense Department funded competition that pitted Princeton against Harvard. Princeton won the competition because the MTBF of the simpler single memory architecture was much better, albeit slower, than the Harvard submission. With the development of the transistor and IC's the Harvard Architecture is finally coming into it's own. Microchip has made a number of enhancements to the original architecture, and updated the functional blocks of the original design with modern advancements that are in concert with existing architectural processes and enabled by the low cost of semiconductors. Contributed by Len Umina ------------------------------ 2.2) PIC Variants PIC processors are available in three families, which Microchip refers to as the PIC16C5x, PIC16Cxx, and PIC17Cxx families. PIC16C5x: 12 bit program word size, 33 instructions, 2 level stack, no interrupts Program Data Max. Voltage Typical Digikey memory memory I/O freq. Range Current Price (words) (bytes) pins (MHz) (Volts) (mA) (US $) ---------- --------- --------- ----- ----- -------- ------- ------- PIC16C54 512 25 12 20 2.5-6.25 2 4.39 PIC16C54A 512 25 12 20 2.5-6.25 2 PIC16CR54 512 ROM 25 12 20 2.0-6.25 1 PIC16CR54A 512 ROM 25 12 20 2.0-6.25 1 PIC16C55 512 24 20 20 2.5-6.25 2 5.44 PIC16C56 1024 25 12 20 2.5-6.25 2 5.03 PIC16C57 2048 72 20 20 2.5-6.25 2 6.24 PIC16CR57A 2048 ROM 72 20 20 2.0-6.25 1 PIC16C58A 2048 73 12 20 2.5-6.25 1 PIC16Cxx: 14 bit word size, 35 instructions, 8 level stack Program Data Max. Voltage Typical Digikey memory memory I/O freq. Range Current Price (words) (bytes) pins (MHz) (Volts) (mA) (US $) ---------- --------- --------- ----- ----- -------- ------- ------- PIC16C64 2048 128 33 20 2.0-6.0 3 11.05 PIC16C71 1024 36 13 16 3.0-6.0 2 14.38 PIC16C74 4096 192 PIC16C84 1024 EE 36 + 64 EE 13 10 2.0-6.0 2 10.15 PIC17Cxx: 16 bit word size, 55 instructions, 16 level stack: Program Data Max. Voltage Typical Digikey memory memory I/O freq. Range Current Price (words) (bytes) pins (MHz) (Volts) (mA) (US $) ---------- --------- --------- ----- ----- -------- ------- ------- PIC17C42 2048 256 33 25 4.5-5.5 6 15,15 PIC17C44 8192 480 33 25 Notes: 1. Program memory is EPROM unless otherwise noted. 2. Data memory is number of usable bytes, not including special function registers. 3. Digikey prices are quantity 10 prices for 4 MHz DIP packaged OTP parts with RC oscillator option (where applicable), except that the 16C84 uses EE PROM program memory, and the slowest speed 17C42 is rated at 16 MHz. Prices are from Digikey catalogue number 943 for May/June 1994. Other distributors often have lower prices, but typically also have high minimum order requirements. Digikey also usually has plenty of parts in stock. Windowed EPROM parts cost substantially more. Contributed by Eric Smith ------------------------------ 2.3) PIC contacts and representatives I don't know what Country these are in for sure. Micro Engineering Labs tel:(719) 520-5323 makes PIC-Proto boards Myriad Development tel:(303) 692-3836 CCS - C compiler tel: (414) 781-2794 extension 30 ED Teck. Pubs tel:407-454-9905 Fred Eady BBS:407-454-3198 Writes articles for popular magazines. Has a PIC programmer kit for $70. Needham Electronics tel:(916) 924-8037 I don't know if they make PIC stuff, fax:(916) 972-9960 but they make an EPROM programmer, the PB-10 bbs:(916) 972-8042 Their emp-20 is great for Pics,Pals,Gala,EEproms etc but is ~$500 It can be set to auto program on start up. It takes about 4 seconds for a bat file to reassemble the source with new EQU's from the command line, recompile and program a part. Protel tel:1-800-544-4186 Builder of EASYTRAX, which is a free-ware bbs:1-408-243-0125 PCB drawing Package Call Ext 225 ask for Louise Markham. Bell Industries tel:1-800-525-6666 Electronic Distributor, including PIC's ............................. Australia Microchip Technology tel:61 03 890 0970 Product information HarTec Limited tel: (03) 268 9000 205a Middleborough Road fax: (03) 899 0819 Box Hill, Victoria 3128 Distributor MicroZed Computers tel:61 67 722 777 296 Cook's Road fax:61 67 728 987 Armidale, NSW 2350 Stamp Products Technology Affair tel:61 9 246 4810 Carine, WA fax:61 9 246 4809 Pic Tools ............................. Austria Wilke Technology tel:49 241 15 4071 Aachen fax:49 241 15 8475 Stamp products ............................. Belgium G.S.E. tel:32 41 77 51 51 Soumagne fax:32 41 77 53 53 Stamp Products ............................. Canada Aerosystems International tel:514 336 9426 St. Laurent Quebec fax:514 336 4383 Stamp Products AP Circuits BBS 1-403-291-9342 Can download EASYTRAX(V2.06), various utilities, GERBER file proofers, etc. You can upload PCB files and they will make boards and ship to you in about week. (about $100) ............................. Czech Republic MITE tel:42 49 5813 252 Hradek Kralove fax:42 49 5813 260 Stamp Products ............................. France Arizona Microchip Technology SARL tel:33 01 6930 9090 2, Rue Du Buisson aux Fraises fax:33 01 6930 9079 F-91300 Massy, France Product information Selectronic tel:33 20 52 98 52 Lille Cedex fax:33 20 52 12 04 Stamp Products ............................. Germany Arizona Microchip Technology GMBH tel:49 089 609 6072 Alte Landstrasse 12-14 fax:49 089 609 1997 D-8012 Ottobrunn, Germany Product information Wilke Technology tel:49 241 15 4071 Aachen fax:49 241 15 8475 Stamp products ............................. Greece Peter Caritato & Associates tel:30 1 902 0115 Athens fax:30 1 901 7024 Stamp Products ............................. Hong Kong Microchip Technology Inc. tel:852 410 2716