AskAWord.com
Spellcheck • Thesaurus • Dictionary • Encyclopedia


History: PIC microcontroller

PIC microcontroller

Spellcheck: microcontroller

Thesaurus: No synonyms found.

Dictionary: No definition found.


Encyclopedia: PIC microcontroller, Talk:PIC microcontroller

PIC is a family of RISC microcontrollers made by Microchip Technology, derived from the PIC1650 originally developed by General Instrument's Microelectronics Division.

Microchip Technology does not use PIC as an ; in fact the brand name is PICmicro. It is generally regarded that PIC stands for Peripheral Interface Controller,although General Instruments' original acronym for the PIC1650 was "Programmable Intelligent

The original PIC was built to be used with GI's new 16-bit CPU, the CP1600. While generally a good CPU, the CP1600 had poor I/O performance, and the 8-bit PIC was developed in 1975 to improve performance of the overall system by offloading I/O tasks from the CPU. The PIC used simple microcode stored in ROM to perform its tasks, and although the term wasn't used at the time, it is a RISC design that runs one instruction per cycle (4 oscillator cycles).

In 1985 General Instruments spun off their microelectronics division, and the new ownership cancelled almost everything — which by this time was mostly out-of-date. The PIC, however, was upgraded with EPROM to produce a programmable channel controller, and today a huge variety of PICs are available with various on-board peripherals (serial communication modules, UARTs, motor control kernels, etc.) and program memory from 512 words to 32k words and more (a "word" is one assembly language instruction, varying from 12, 14 or 16 bits depending on the specific PIC micro family).

thumb|Various older (EPROM) PIC microcontrollers

Coding for PICs


PICs use a RISC instruction set, which varies in length from about 35 instructions for the low-end PICs to about 70 instructions for the high-end PICs. The instruction set includes instructions to perform a variety of operations on the accumulator and a constant or the accumulator and a memory location, as well as for conditionally executing code and jumping/calling other parts of the program and returning from them, and specific hardware features like interrupts and one low-power mode called sleep. Microchip provides a freeware IDE package called MPLAB, that also includes a software simulator as well as an assembler.

Third parties make C and BASIC language compilers for PICs. Microchip also sells compilers for the high-end PICs ("C18" for the 18F series and "C30" for the dsPICs). They also make available for download a "student edition/demo" version of C18 or C30 which disables some optimiser features after a timeout period. Open-source compilers for the C, Pascal, JAL, BASIC, and for the Forth programming language, PicForth, have also been released.

GPUTILS is an Open Source collection of tools, distributed under the GNU General Public License. GPUTILS includes an assembler and linker and works on Linux, Mac OS X, OS/2 and Microsoft Windows. GPSIM is an Open Source simulator for the PIC microcontrollers featuring hardware modules that simulate specific devices that might be connected to them, like LCDs.

Programming PICs


thumb|250px|right|A development board for low pin-count MCU, from Microchip
Devices called "programmers" are traditionally used to get program code into the target PIC. Most PICs that Microchip sells nowadays have ICSP (In Circuit Serial Programming) and/or LVP (Low Voltage Programming) capabilities, allowing the PIC to be programmed while it is sitting in the target circuit. ICSP programming is performed using the RB6 and RB7 pins for clock and data, while a high voltage (12V) is present on the Vpp/MCLR pin. Low voltage programming allows for the elimination of the extra voltage rail in the programmer but comes at the cost of an IO pin and can therefore be disabled (once disabled it can only be re-enabled using high voltage programming). There are many programmers for PIC microcontrollers, ranging from the extremely simple designs that rely on the communications software for taking care of all the communication details to complex designs that can verify the device at several supply voltages and can do much of the work in the hardware. Many of these complex programmers use a pre-programmed PIC themselves to send the programming commands to the PIC that is to be programmed.

Many of the higher end flash based PICs can also write to their own program memory. Demo boards are available with a small bootloader factory programmed that can be used to load user programs over an interface such as RS-232 or USB.

There are many programmers/debuggers available directly from Microchip:

Microchip Programmers (as of 10/2005)
* PICStart Plus (RS232 serial interface)
* Promate II (RS232 serial interface)
* MPLAB PM3 (RS232 serial and USB interface)
* ICD2 (RS232 serial and USB interface)
* PICKit 1 (USB interface)
* PICKit 2 (USB interface)

Development tools



http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=81 Microchip home page

http://www.ccsinfo.com CCS The CCS compiler supports a large number of in-built libraries, which aid in quick development time. It also has excellent optimization features utilizing low ROM when compared with other compilers (such as Hi-Tech etc).

http://www.bknd.com CC5X This is another C compiler Knudsen Data. It is extremely powerful but lacks the large number of libraries that are available in CCS.

http://www.melabs.com microEngineering Labs, Inc. The creators of PICBASIC also offer USB PIC Programmers, LAB-X Experimenter Boards, PICPROTO Boards, books and other resources.

http://sdcc.sourceforge.net/ SDCC - Small Device C Compiler SDCC is a free, open source C compiler where work is in progress for the PIC16 and PIC18 series. It is distributed under GPL license.

http://www.picbasic.org Proton Development Suite Popular BASIC Compiler, comprehensive and well supported by its users.

http://www.pocketmt.com mcuStudio An Open-source multiplatform development environment for PIC Microcontrollers (MPLab IDE Like) based on http://www.eclipse.org Eclipse.

http://www.ktechlab.org KTechlab Open-source development environment for electronic circuits.

http://www.htsoft.com Hi-Tech C C compiler for the full range of PIC microcontrollers.

There are also programmers available from other sources, ranging from plans as to how to build your own, to kits to put together yourself, to fully tested ready-to-go units. Some are simple designs which require a PC to do the low-level programming signalling (these typically connect to the serial or parallel port and consist of a few simple components), while others have the programming logic built into them (these typically use a serial or USB connection, are usually faster, and are many times built using PICs themselves for control). These are some common programmers:

Simple serial port programmers



These generally rely on driving the PIC's Vss line negative to get the necessary voltage differences from programming. Hence they are compact and cheap but great care is needed if using them for in circuit programming.

* http://www.jdm.homepage.dk/newpic.htm JDM programmer (serial-port programmer)
* http://feng3.cool.ne.jp/en/rcd.html Feng's RCD programmer (serial-port programmer)
* http://www.hamradioindia.org/circuits/feng.php Feng's Multi PIC programmer (serial-port programmer)

Compatible software:

* http://www.ic-prog.com IC Prog A freeware programmer for MS Windows
* http://www.hamradioindia.org/circuits/winpic.php WinPic A PIC Programmer for Windows
* http://hyvatti.iki.fi/~jaakko/pic/picprog.html picprog A PIC programmer for GNU/Linux

Simple parallel port programmers



Simple to understand but often have much higher part counts and generally require external power supplies.

* http://kitsrus.com/pdf/k96.pdf P16PRO40 from http://kitsrus.com (parallel port programmer)
* http://fly.cc.fer.hr/~nix/Linux/Programmer_hard/Prog_Shematic.gif Tait-style programmer (parallel port programmer)
* http://web.mit.edu/6.115/www/pic.shtml MIT's Low Voltage PIC programmer (parallel port programmer)

Compatible Linux software:

* http://cole.homedns.org/picprg.php PICPrg A fast Linux command line (or ncurses) program, to program any Microchip PIC using the PC parallel port interface. Program/verify PIC data, erase non-protected/protected PIC data or calculate the PIC checksum.
* http://web.mit.edu/6.115/www/pic.shtml JimPIC Fast & simple program for Linux and Windows to control the MIT Low Voltage PIC programmer using the parallel port.

Intelligent programmers



Generally faster and more reliable (especially on laptops which tend to have idiosyncrasies in the way they implement their ports) but far more complex to build (in particular they tend to use a PIC in the programmer which must itself be programmed somehow).

* http://www.voti.nl/wisp628/index.html Wisp628 (intelligent serial port in-circuit programmer built around a PIC16F628. Kit, code, and schematics available.)
* http://www.embedinc.com/easyprog/ EasyProg (intelligent serial port in-circuit and standalone programmer. Kit and ready-to-go version available)

An exhaustive list of these is not practical, but a query put out on the piclist ([email protected] — subscription required) would quickly provide many answers from the knowledgeable people who frequent that list and are happy to help.

Debugging


MPLAB (which is a free download) includes a software emulator for PICs. However software emulation of a microcontroller will always suffer from limited simulation of the devices interactions with its target circuit.

The MPLAB ICD2 offers fairly cheap (about £100) in circuit debugging via a RS-232 serial/USB interface. A programming/debug connector (the ICD2 has a RJ12 socket and comes with a cross wired RJ12 lead but there is nothing preventing the use of custom cables to other connector types) is designed into the target circuit. This cheap and simple debugging system comes at a price however, namely limited breakpoint count (1 on older pics 3 on newer PICs), loss of some IO (with the exception of some surface mount 44 pin PICs which have dedicated lines for debugging) and loss of some features of the chip. For small PICs where the loss of IO caused by this method would be unacceptable special headers are made which are fitted with PICs that have extra pins specifically for debugging. Some third party debugging solutions also exist using the on chip facilities provided for the ICD2.

Finally microchip offers two full in circuit emulators. The MPLAB ICE2000 (parallel interface, a USB converter is available) and the newer MPLAB ICE4000 (USB interface).

Word size


The word size of PICs is a source of much confusion. All PICs (except dsPICs and PIC24s) handle data in 8-bit chunks, so they should be called 8-bit microcontrollers. But unlike high-end CPUs, PICs use Harvard architecture, so the size of an instruction can be different from the size of the data. In fact, different PIC families use different instruction sizes, which makes it a challenge to compare the code size of PICs to other microcontrollers. For example, say a microcontroller has 6144 bytes of program memory. For a 12-bit PIC, this works out to 4096 words (or assembly instructions); for a 16-bit PIC, this is 3072 words.

Modern PICs


The old PROM and EPROM PICs are now gradually replaced by chips with Flash memory. Likewise the original 12-bit instruction set of the PIC1650 and its direct descendants has been superseded by 14-bit and 16-bit instruction sets. Microchip still sells OTP (one-time-programmable, or PROM) and UV-eraseable (EPROM) versions of some of its PICs for legacy support, or volume orders. It should be noted that the Microchip website lists PICs that are not electrically erasable as OTP despite the fact that UV erasable windowed versions of these chips can be ordered.

Features


Current PICs offer a wide range of built-in hardware, such as:
*8/16 bit Modified Harvard architecture CPU cores
*Flash and ROM Memory options in 256 byte to 256 kilobyte array sizes
*I/O Ports (0 to 5.5 volts Typical)
*8/16 Bit Timers
*several features for reducing consumption during sleep
*Synchronous/Asynchronous Serial Peripherals USART, AUSART, EUSARTs
*Analog-to-digital converters, 10/12 bit
*Voltage Comparators
*Capture/Compare/PWM modules
*LCD Drivers
*MSSP Peripheral for I²C and SPI Communications
*Internal EEPROM Memory - up to 1M erase/write cycles durability
*Motor Control Peripherals
*USB interfacing support
*Ethernet controller support
*CAN controller support
*LIN controller support
*IrDA controller support
*Integrated analog RF front ends (PIC16F639, and rfPIC)
*KEELOQ Rolling code encryption peripheral (encode/decode)
*DSP digital signal processing capabilities (dsPIC)

PICs on the Internet


PICs are well-documented on the Internet, mainly for two reasons. First, PICs were commonly used to defeat the security system of popular consumer products (pay-TV, PlayStation), which attracted the attention of crackers. Second, the now obsolete PIC16C84 was the first widely available microcontroller that could easily be re-programmed by hobbyists.
There are many forums and lists concerning PIC microcontrollers where the user can post questions and receive free answers.

PIC clones


Every now and then there are companies that offer cheap and/or enhanced PIC versions. Most seem to disappear quite soon. Ubicom (formerly Scenix) seems to avoid this fate and produces the SX, a PIC clone that runs much faster than the original (as of November 2005 http://www.parallax.com Parallax is the exclusive supplier of the SX). OpenCores has a pic16f84 core written in Verilog.

Wireless PICs


The rfPIC microcontroller devices integrate the power of Microchip's PICmicro devices with UHF wireless communication capabilities for low power RF applications. The devices offer small package outline and low external component count to fit the most space-constrained applications.

dsPICs (Digital Signal PICs)


dsPICs are Microchip's newest family, which entered mass production in late 2004. They are designed as a PIC with digital signal processing capabilities. These are Microchip's first inherent 16-bit (data) microcontrollers. They build on the PICs existing strengths by offering hardware MAC (multiply-accumulate), barrel shifting, bit reversal, (16x16)-bit multiplication and other digital signal processing operations. Can be efficiently programmed in C using a variant of gcc.

8/16-bit PIC microcontroller product families


These links take you to product selection matrices at the manufacturer's site.

8-bit Microcontrollers
* http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=1009&mid=10&lang=en&pageId=74 PIC10
* http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=1001&mid=10&lang=en&pageId=74 PIC12
* http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=1008&mid=10&lang=en&pageId=74 PIC14
* http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=1002&mid=10&lang=en&pageId=74 PIC16
* http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=1003&mid=10&lang=en&pageId=74 PIC17
* http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=1004&mid=10&lang=en&pageId=74 PIC18

16-bit Microcontrollers

* http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=1032&mid=10&lang=en&pageId=74 PIC24

16-bit Digital Signal Controllers
* http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=8071&mid=14&lang=en&pageId=75 dsPIC30
* http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=8081&mid=14&lang=en&pageId=75 dsPIC33F

The F in a name generally indicates the PICmicro uses flash memory and can be erased electronically. A C generally means it can only be erased by exposing the die to ultraviolet light (which is only possible if a windowed package style is used).

Commonly used PICs


* /509 (Small 8-pin package, internal oscillator, popular in small designs such as the http://www.maushammer.com/systems/ipod-remote/ipod-remote.html iPod remote)
* /675/683
* (generally considered obsolete, but still popular)
* (upgrade to above, some versions do 20 MHz, 1:1 compatible with PIC16F84)
* (replaces the PIC16F84. The 16F628A has more program memory and fully compatible)
* (an excellent all-round 18-pin PICmicro)
* The PIC16F87X family (The PIC16F84's "big brothers", with lots of built in hardware similar to the 16F88. Quite common in hobby projects.)
* (RS232, Parallel Port Interface, PWM and much more)
* (Now matured and replaced with the )
* and relatives (Full-speed USB support, all sorts of inbuilt hardware. Very powerful and versatile)

See also


* Arduino
* BASIC Stamp
* OOPic
* PICAXE



External links


External links|November

Software


[Pic Basic Compiler
http://picforge.interfree.it]

PicForge Pro 2.0.5



A complete environment of development and easy use realized for all those people who intend to quickly perform programs for PIC and without writing some line of code MPASM.
With PicForge it is possible to write a program for PIC in formed MPASM on purpose departing from the simple code more Basic some simple commands custom servants for the peripheral ones of the microcontrolloris

PIC Emulators & Simulators


* http://sourceforge.net/projects/picmicrosim/
* http://www.oshonsoft.com

Linux PIC Programmer Software


*http://cole.homedns.org/picprg.php PICPrg A fast Linux command line (or ncurses) program, to program any Microchip PIC using the PC parallel port interface. Program/verify PIC data, erase non-protected/protected PIC data or calculate the PIC checksum.
*http://piklab.sourceforge.net Piklab An integrated development environment for PIC-based applications. It includes graphical and command-line interface for serial and parallel PC port programmers, the ICD2 debugger, the PICkit1 and PICkit2 programmers.

Other links


*http://www.microchip.com www.Microchip.com Microchip Technology - PIC micro Official web site
*http://www.microchipC.com www.MicrochipC.com Unofficial site devoted to C coding on the PIC microcontroller. Over 400Kb of free sample source code in C. Also includes free PIC bootloaders, tutorials, FAQ, and hardware schematics.
*http://www.blitzlogic.com www.blitzlogic.com BLITZLOGIC - Sample CODE & wiring for PIC/8051/AVR web site
*http://www.satsleuth.com/Microcontroller.htm SatSleuth Circuits site with many PIC designs, most with source code and schematics.
*http://www.mikroe.com mikroElektronika - Development Tools, Compilers, Books Basic, Pascal and C compilers, Development Tools and free online books for PIC and dsPIC microcontrollers.
*http://www.picbasic.org BASIC programming, PIC BASIC Compiler Free Windows compiler and support forum, free code examples, demos and circuits.
*http://www.hobbyprojects.com/microcontroller_tutorials.html PIC Microcontroller Tutorial Online Tutorial Resource of PIC Microcontroller.
*http://www.idcomm.com/personal/ottosen Page with links to the original PIC1650 documents
*http://gputils.sourceforge.net GPUTILS Open Source assembler and linker.
*http://www.gnupic.org GNUPIC Site with many Free Software PIC development resources.
*http://gcbasic.sourceforge.net Great Cow BASIC A free, open-source BASIC compiler for PIC microcontrollers.
*http://www.mtoussaint.de/yapide.html YaPIDE An IDE and simulator for the PIC 16F628 released under the GPL-2 license.
*http://www.rfc1149.net/devel/picforth PicForth Forth compiler available under the GPL.
*http://sdcc.sourceforge.net/ SDCC: Small Device C Compiler; an Open Source compiler for microcontrollers, PIC 16x and 18x support is a work in progress.
*http://www.freertos.org/ FreeRTOS: Open Source mini real time kernel (RTOS) for 8 and 16bit PICs.
* http://www.s12x.com/cep/ Code Edit Pro - A very configurable open source editor.
*http://www.picguide.org Resource page with free projects and books for the PIC Microcontroller
*http://www.geocities.com/sahfeie/electronics Electronics PIC Microcontroller Programming Tutorial.
*http://www.htsoft.com/ Hi-Tech C C compiler for the full range of PIC microcontrollers.

RISC-based processor

Category:Microcontrollers

da:PIC mikrocontroller
de:PICmicro
es:Microcontrolador PIC
fr:Microcontrôleur PIC
it:PIC
ja:PIC (コントローラ)
pl:Mikrokontroler PIC
pt:Microcontrolador PIC
sv:PIC
vi:Vi điều khiển PIC
tr:PIC

Spellcheck • Thesaurus • Dictionary • Encyclopedia



Comments

This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "PIC microcontroller" .