PIC Resources
From DP
Revision as of 22:56, 28 November 2010 by Dpropicweb (Talk | contribs)
Contents |
Information
- Microchip website for all things PIC (application notes, sample code, device datasheets, device errata, device reference guides, development board user manuals, board schematics and code etc).
- Microchip Forums cover microcontrollers, programmers, compilers etc.
- The PIC Mailing List
Third Party Compilers
- JALv2 is an open source JAL (Just Another Language) compiler. JAL is a high level language designed to hide the general nuisance of programming a Microchip PIC. It is derived from the original JAL, by Wouter van Ooijen, which is loosely based on Pascal. JAL compiles code for baseline, midrange and the 18F PIC series. Extensive libraries are available for JAL and there is an IDE called JAL Edit. The JALv2 is an open source cross platform compiler running under Windows, Linux, FreeBSD and Mac OS X.
- Great Cow BASIC An open Source BASIC compiler for Microchip PIC (and Atmel AVR) microcontrollers. There's also Great Cow Graphical BASIC which is an icon-based program editor. It allows you to create Great Cow BASIC programs without having to memorise commands. This makes it particularly useful for those who have never before done any programming.
- PicForth is a Forth compiler written in gforth and hosted on Unix (or Linux) which generates code for the PIC 16F87x and 16F88 series. It includes two kinds of cooperative schedulers.
- SDCC is a retargettable, optimizing ANSI - C compiler that targets the Intel 8051, Maxim 80DS390, Zilog Z80 and the Motorola 68HC08 based MCUs. Work is in progress on supporting the Microchip PIC 16 and 18 series. SDCC is Free Open Source Software, distributed under GNU General Public License (GPL).
- PMP (Pic Micro Pascal) is a free Pascal cross compiler for PIC processors. It is intended to work with the Microchip MPASM/MPLINK suite installed; it has its own IDE and it is a highly optimized compiler. It supports most devices from PIC 10 to 18.
- mikroElektronika sells C, BASIC, and Pascal compilers for Windows with their own IDE for the Microchip PIC and dsPIC microcontroller series. These compilers have extensive function libraries. Code size limited demo versions are available for free download.
- SourceBoost Technologies sell BASIC, C and C++ compilers running under Windows for PIC18, PIC16 and some PIC12s. Code and RAM-size limited lite versions are available for free download.
Operating Systems, Kernels
- FlashForth is a native Forth operating system for the PIC 18F and the dsPIC 30F series. It makes the PIC a standalone computer with an interpreter, compiler, assembler and multitasker.
- FreeRTOS is a mini real time kernel ported to the PIC 24, dsPIC and PIC 32 series.
- MIOS is a real-time operating system written in PIC assembly for the requirements of flexible MIDI applications like MIDI controllers, processors, synthesizers, sequencers. PIC 18F452, 18F4620 and 18F4685.
Programmers
Microchip and clones
- PICkit 2 The hobbyist's choice. A powerful programmer and debugger with cross-platform programming software (Windows via the MPLAB IDE, standalone application and command line application; Linux - with source code; Mac OS X - with source code). Debugging is only available with the Windows MPLAB IDE software. Additional Windows-only software is freely available from the Microchip website for a UART Tool (use the PICkit 2 for PIC MCU serial communications) and a Logic Tool Analyzer (use the PICkit 2 to capture digital waveforms in a circuit). You can connect multiple PICKit 2 programmers to your PC at the same time, use one as a programmer, another as a logic analyser, a third as a serial port (UART tool). The PICkit 2 can also be used to program microcontrollers without being attached to a computer (Programmer-To-Go feature). Since the release of the PICkit 3 in 2009 (see below) Microchip have hinted that they will not add support for newer microcontrollers, but this does not seem to have been the case to date. There is also a user-created tool, the PICkit 2 Device File Editor which makes it easy(ier) to add new devices yourself. Note that some device are not supported in the MPLAB IDE but require the use of the standalone PICkit 2 programming application.
- PICkit 2 clones Microchip made the PICkit 2 schematic, firmware and software freely available from their website and this has encouraged a slew of Chinese clones and a small number of enhanced, more expensive, clones. See eBay for current clones, also check vendors' own websites which may be cheaper (but watch the shipping charges!).
- PICkit 3 Beware the newer PICkit 3. It is more like an ICD2 rather than a PICkit 2. From a hardware viewpoint, the PICkit 3 is a hybrid of PICkit 2 and the ICD 2; from a software viewpoint, it is purely an ICD 2. None of the good software architecture of PICkit 2 has shown up in PICkit 3 (yet anyway). The UART Tool and the Logic Tool Analyzer Tool are not available for it. The only programming and debugging software available for it is the Windows MPLAB IDE. To top it off it costs more than the PICkit 2 for significantly less functionality. The only reason you might consider it is that Microchip has committed to support it for future microcontrollers.
- ICD 2 Superseded by the newer, cheaper ICD 3 (see below). Avoid.
- ICD 3 In-Circuit-Debugger. Faster programming than a PICkit, but 4 times more expensive (or more compared with PICkit 2 clones). Also requires the purchase of additional header boards with a special microcontroller for debugging some 8-, 14- and 18-pin PIC microcontrollers.
Use a Bus Pirate
- The Pirate PIC Programmer software application turns your Dangerous Prototypes' Bus Pirate into a basic PIC programmer! It has somewhat limited PIC support at present and needs a programming adapter for older 8 bit PIC 12/14/16/18 devices that use a 13 volt supply for programming. The hardcore hacker's choice - feel free to add support for your favourite PIC device and get a free programming adapter!
Build your own
- PICkit 2 clone using through-hole parts only.
- ICD 2 clone
- ICD 2 clone on a breadboard
Development Boards
- Microchip provides a comprehensive range of development boards and kits. Of particular note is the inexpensive ($US 24.99) Microchip Microstick; a USB-powered, breadboard compatible board and programmer/debugger supplied with the 28 pin DIP packaged PIC24HJ64GP502 and dsPIC33FJ64MC802 (Note: these are the only devices supported by the inbuilt programmer/debugger).
- Seeed Studio (China) sells Dangerous Prototypes' very own Web Platform which is a great inexpensive dsPIC33 development board. It comes with a bootloader already installed so you do not need a programmer to start programming! Just $US 40 including worldwide delivery from Seed Studio.
- Sure Electronics (China) provide a range of cheap(er) development boards, PICkits and a useful universal PIC programming socket.
- Jaluino is an open-source project aimed to provide Arduino-like boards based on the PIC 18 family and powered by jalv2 and jallib. Schematics, PCB Gerbers, tutorials, etc are all available.
Tutorials
- PIC18Fxxx Tutorial A comprehensive PIC18Fxxx tutorial from a Microchip Conference (2002) - MPLAB IDE, C18 C compiler.
- Introduction to dsPIC33 programming An introduction to writing and compiling your own applications for the Dangerous Prototypes' Web Platform - MBLAB IDE, C30 C compiler.
- Compiling PIC projects Dangerous Prototypes PIC projects tutorial - MPLAB IDE, C18 C compiler, C30 C compiler.
- Programming PICs with a programmer An introduction to programming the Dangerous Prototypes' Bus Pirate - MPLAB IDE.
- MPLAB X Installation (Linux), Converting legacy MPLAB 8.xx projects, limitations - beta MPLAB X IDE
- Assembler Tutorial - Pt 1 and Assembler Tutorial - Pt 2 Introduction to assembler using the PIC 12F683 - MPLAB IDE, MPASM assembler.
Books
mikroElektronika rather generously makes the following books which it publishes (and sells in hard copy) available online for free:
