Pic C Compiler Open Source

Welcome to pcc, the Portable C Compiler. This website is a wiki. Please join and help improve the website and pcc. The compiler is based on the original Portable C Compiler by S. Johnson, written in the late 70's. About 50% of the frontend code and 80% of the backend code has been modified. See the PCC History wiki page for details. I am looking for a free, and possibly open source C compiler for PIC. I might go without C, but I would like to get both options. There are various compilers out there, but since I have never done PIC development before, I am looking for user experience and advice.

What is SDCC?

SDCC is a retargettable, optimizing Standard C (ANSI C89, ISO C99, ISO C11) compiler suite that targets the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.), Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) HC08 based (hc08, s08), Zilog Z80 based MCUs (z80, z180, gbz80, Rabbit 2000/3000, Rabbit 3000A, TLCS-90), Padauk (pdk14, pdk15) and STMicroelectronics STM8. Work is in progress on supporting the Padauk (pdk13), Microchip PIC16 and PIC18 targets. It can be retargeted for other microprocessors.

SDCC suite is a collection of several components derived from different sources with different FOSS licenses. SDCC compiler suite include:

  • sdas and sdld, a retargettable assembler and linker, based on ASXXXX, written by Alan Baldwin; (GPL).
  • sdcpppreprocessor, based on GCC cpp; (GPL).
  • ucsimsimulators, originally written by Daniel Drotos; (GPL).
  • sdcdbsource level debugger, originally written by Sandeep Dutta; (GPL).
  • sdbinutilslibrary archive utilities, including sdar, sdranlib and sdnm, derived from GNU Binutils; (GPL)
  • SDCC run-time libraries; (GPL+LE). Pic device libraries and header files are derived from Microchip header (.inc) and linker script (.lkr) files. Microchip requires that 'The header files should state that they are only to be used with authentic Microchip devices' which makes them incompatible with the GPL.
  • gcc-testregression tests, derived from gcc-testsuite; (no license explicitely specified, but since it is a part of GCC is probably GPL licensed)
  • packihx; (public domain)
  • makebin; (zlib/libpng License)
  • sdccC compiler, originally written by Sandeep Dutta; (GPL). Some of the features include:
    • extensive MCU specific language extensions, allowing effective use of the underlying hardware.
    • a host of standard optimizations such as global sub expression elimination, loop optimizations (loop invariant, strength reduction of induction variables and loop reversing), constant folding and propagation, copy propagation, dead code elimination and jump tables for 'switch' statements.
    • MCU specific optimizations, including a global register allocator.
    • adaptable MCU specific backend that should be well suited for other 8 bit MCUs
    • independent rule based peep hole optimizer.
    • a full range of data types: char (8 bits, 1 byte), short (16 bits, 2 bytes), int (16 bits, 2 bytes), long (32 bit, 4 bytes), long long (64 bit, 8 bytes), float (4 byte IEEE) and _Bool/bool.
    • the ability to add inline assembler code anywhere in a function.
    • the ability to report on the complexity of a function to help decide what should be re-written in assembler.
    • a good selection of automated regression tests.

SDCC was originally written by Sandeep Dutta and released under a GPL license. Since its initial release there have been numerous bug fixes and improvements. As of December 1999, the code was moved to SourceForge where all the 'users turned developers' can access the same source tree. SDCC is constantly being updated with all the users' and developers' input.

News

Jan 30th, 2020: SDCC 4.0.0 released.

A new release of SDCC, the portable optimizing compiler for 8051, DS390, Z80, Z180, Rabbit 2000, GBZ80, eZ80, TLCS-90, HC08, STM8, Padauk and PIC microprocessors is now available (http://sdcc.sourceforge.net). Sources, documentation and binaries for GNU/Linux amd64, Windows amd64, macOS amd64 and Windows x86 are available.

SDCC 4.0.0 New Feature List:

  • The pdk15 backend now passes the regression tests (both with and without --stack-auto), and is thus considered stable.
  • New in-development pdk13 backend for Padauk µC with 13-bit wide program memory.
  • C2X memccpy(), strdup(), strndup().
  • Better tail call optimization.
  • Many fixes in the pic14 backend.
  • C2X u8 character constants.
  • C2X bool, static_assert, alignof, alignas.
  • C2X attributes on statements.
  • C2X attribute declarations.
  • Support for extended ASCII characters in sdas, sdld.
  • Compiler support for UCNs and non-ASCII utf8 in identifiers.

Numerous other new features and bug fixes are included as well.

You can download the release from:
https://sourceforge.net/projects/sdcc/files/

What Platforms are Supported?

Linux - x86, Microsoft Windows - x86, Microsoft Windows - x86_64 and Mac OS X are the primary, so called 'officially supported' platforms.

SDCC compiles natively on Linux and Mac OS X using gcc. Windows release and snapshot builds are made by cross compiling to mingw32 on a Linux host.

Windows 9x/NT/2000/XP/Vista/7/8 users are recommended to use Cygwin (http://sources.redhat.com/cygwin/) or may try the unsupported Microsoft Visual C++ build scripts.

Downloading SDCC

See the Sourceforge download page for the last released version including source and binary packages for Linux - x86, Microsoft Windows - x86, Microsoft Windows - x86_64 and Mac OS X - ppc and i386.

Major Linux distributions take care of SDCC installation packages themselves and you will find SDCC in their repositories. Unfortunately SDCC packages included in Linux disributions are often outdated. In this case users are encouraged to compile the latest official SDCC release or a recent snapshot build by themselves or download the pre-compiled binaries from Sourceforge download page.

SDCC is known to compile from the source code also on the following platforms:

  • Linux - x86_64
  • Linux - Alpha
  • Linux - IBM Power5
  • NetBSD - i386
  • NetBSD - Sparc64
  • FreeBSD - i386
  • SUN Solaris - i386
  • SUN Solaris - Sparc
  • Rasbian (Debian for Raspberry Pi) - ARMv6
  • Debian - ARMv7-a

SDCC is always under active development. Please consider downloading one of the snapshot builds if you have run across a bug, or if the above release is more than two months old.

The latest development source code can be accessed using Subversion. The following will fetch the latest sources:

svn checkout svn://svn.code.sf.net/p/sdcc/code/trunk/sdcc sdcc

... will create the sdcc directory in your current directory and place all downloaded code there. You can browse the Subversion repository here.

Before reporting a bug, please check your SDCC version and build date using the -v option, and be sure to include the full version string in your bug report. For example:

sdcc/bin > sdcc -v
SDCC : mcs51/gbz80/z80/avr/ds390/pic14/TININative/xa51 2.3.8 (Feb 10 2004) (UNIX)

Support for SDCC

SDCC and the included support packages come with fair amounts of documentation and examples. When they aren't enough, you can find help in the places listed below. Here is a short check list of tips to greatly improve your chances of obtaining a helpful response.

  1. Attach the code you are compiling with SDCC. It should compile 'out of the box'. Snippets must compile and must include any required header files, etc. Incomplete information will hamper your chance of a timely response.
  2. Specify the exact command you use to run SDCC, or attach your Makefile.
  3. Specify the SDCC version (type 'sdcc -v'), your platform and operating system.
  4. Provide an exact copy of any error message or incorrect output.

Please attempt to include these 4 important parts, as applicable, in all requests for support or when reporting any problems or bugs with SDCC. Though this will make your message lengthy, it will greatly improve your chance that SDCC users and developers will be able to help you. Some SDCC developers are frustrated by bug reports without code provided that they can use to reproduce and ultimately fix the problem, so please be sure to provide sample code if you are reporting a bug!

  • Web Page - you are (X) here.
  • Mailing list: [use 'BUG REPORTING' below if you believe you have found a bug.]
    • Send to the developer list <sdcc-devel.AT.lists.sourceforge.net> - for development work on SDCC
    • Send to the user list <sdcc-user.AT.lists.sourceforge.net> - [preferred] all developers and all users.
  • Bug Reporting - if you have a problem using SDCC, we need to hear about it. Please attach code to reproduce the problem, and be sure to provide your email address so a developer can contact you if they need more information to investigate and fix the bug.
  • Website/Documentation Issues - Please report erroneous, missing or outdated information
  • SDCC Message Forum - an account on Sourceforge is needed if you're going to post and reply. Short easy online fill-in the blanks.
  • Open Knowledge Web Site - Run by Thorsten Godau <thorsten.godau.AT.gmx.de>

Who is SDCC?

  • Sandeep Dutta <sandeep.AT.users.sourceforge.net> - original author (SDCC's version of Torvalds)
  • Jean Loius-VERN <jlvern.AT.writeme.com> - substantial improvement in the back-end code generation.
  • Daniel Drotos <drdani.AT.mazsola.iit.uni-miskolc.hu> - Freeware simulator for 8051.
  • Kevin Vigor <kevin.AT.vigor.nu> - numerous enhancements and bug fixes to the Dallas ds390 tree.
  • Johan Knol <johan.knol.AT.users.sourceforge.net> - testing and patching ds390 tree, bug stompper extrodanaire
  • Scott Dattalo <scott.AT.dattalo.com> - sdcc for Microchip PIC controller target
  • Karl Bongers <karl.AT.turbobit.com> - mcs51 support, winbin builds, and an occasional bug.
  • Bernhard Held <bernhard.AT.bernhardheld.de> - snpshot builds and general housekeeping
  • Frieder Ferlemann <Frieder.Ferlemann.AT.web.de> - contributions to the documentation and last stages of code generation
  • Jesus Calvino-Fraga <jesusc.AT.ece.ubc.ca> - math functions, AOMF51, linker improvements
  • Borut Ražem <borut.razem.AT.gmail.com> - WIN32 MSC, cygwin and mingw ports, NSIS installer, preprocessor and front end improvements, bug fixing, snapshot builds on Distibuted Compile Farm, ...
  • Vangelis Rokas <vrokas.AT.otenet.gr> - PIC16 taget development for Microchip PIC18F microcontrollers
  • Erik Petrich <epetrich.AT.users.sourceforge.net> - Bug fixes and improvements for the front end, 8051, z80 and hc08
  • Dave Helton <dave.AT.kd0yu.com> - website design
  • Paul Stoffregen <paul.AT.pjrc.com> - mcs51 optimizations and website maintenance.
  • Michael Hope <michaelh.AT.juju.net.nz> - initial Z80 target, additional coding and bug fixes.
  • Maarten Brock <sourceforge.brock.AT.dse.nl> - several bug fixes and improvements, esp. for mcs51 target
  • Raphael Neider <RNeider.AT.web.de> - bug fixes and optimizations for PIC16, completion of the PIC14 target
  • Philipp Klaus Krause <pkk.AT.spth.de> - work on the STM8,Z80,Z180,Rabbit,GBZ80,TLCS-90 backends, compiler research
  • Leland Morrison <enigmalee.AT.sourceforget.net> - Rabbit 2000 support: the target code generator, sdasrab assembler and ucsim support
  • Molnár Károly <molnarkaroly.AT.users.sf.net> - adding pic devices, developing and maintaining pic device files generation scripts
  • Ben Shi <powerstudio1st.AT.163.com> - the front-end, the STM8 back-end, and the MCS-51 back-end maintain

SDCC has had help from a number of external sources, including:

  • Alan Baldwin <baldwin.AT.shop-pdp.kent.edu> - Initial version of ASXXXX and ASLINK.
  • John Hartman <noice.AT.noicedebugger.com> - Porting ASXXXX and ASLINK for 8051.
  • Dmitry S. Obukhov <dso.AT.usa.net> - malloc and serial I/O routines.
  • Pascal Felber - Some of the Z80 related files are borrowed from the Gameboy Development Kit (GBDK).
  • The GCC development team - for GNU C preprocessor, the basis of sdcpp preprocessor and gcc test suite, partially included into the SDCC regression test suite
  • The GNU Binutils development team - for GNU Binutils, the basis of sdbinutils
  • Boost Community - for Boost C++ libraries used in sdcc compiler
  • Timo Bingmann - for STX B+ Tree C++ Template Classes used in sdcc compiler
  • Malini Dutta <malini.AT.mediaone.net> - Sandeep's wife, for her patience and support.

Past news

Jan 24th, 2020: SDCC 4.0.0 RC1 released.

SDCC 4.0.0 Release Candidate 1 source, doc and binary packages for amd64 GNU/Linux, 32 and 64 bit Windows and amd64 macOS are available in corresponding folders at: http://sourceforge.net/projects/sdcc/files/.

Apr 15th, 2019: SDCC 3.9.0 released.

A new release of SDCC, the portable optimizing compiler for 8051, DS390, Z80, Z180, Rabbit 2000, GBZ80, eZ80, TLCS-90, HC08, STM8, Padauk and PIC microprocessors is now available (http://sdcc.sourceforge.net). Sources, documentation and binaries for GNU/Linux amd64, Windows amd64, macOS amd64 and Windows x86 are available.

SDCC 3.9.0 Feature List:

  • Support for struct / union assignment.
  • Optimizations in the stm8 backend relevant to soft float increase Whetstone score by two thirds.
  • Improvements in rematerialization in the stm8 backend improve code generation for struct, union and arrays.
  • New stack allocator reduces stack space usage for the stm8, z80, z180, gbz80, r2k, r3ka, tlcs90 backends.
  • New ez80_z80 backend for eZ80 in Z80 mode.
  • Removed deprecated sdcclib utility.
  • New pdk14 backend for Padauk µC with 14-bit wide program memory.
  • New in-development pdk15 backend for Padauk µC with 15-bit wide program memory.
Ccs

Numerous other new features and bug fixes are included as well.

You can download the release from:
https://sourceforge.net/projects/sdcc/files/

Apr 8th, 2019: SDCC 3.9.0 RC1 released.

SDCC 3.9.0 Release Candidate 1 source, doc and binary packages for amd64 GNU/Linux, 32 and 64 bit Windows and amd64 macOS are available in corresponding folders at: http://sourceforge.net/projects/sdcc/files/.

Sep 27th, 2018: SDCC 3.8.0 released.

A new release of SDCC, the portable optimizing compiler for 8051, DS390, Z80, Z180, Rabbit 2000, GBZ80, TLCS-90, HC08, STM8 and PIC microprocessors is now available (http://sdcc.sourceforge.net). Sources, documentation and binaries for GNU/Linux amd64, Windows amd64, macOS amd64 and Windows x86 are available.

SDCC 3.8.0 Feature List:

  • Additional general utility function: bsearch().
  • Support for rematerialization in the stm8 backend reduces register pressure and stack usage.
  • Merged upstream GNU binutils 2.30
  • All Python code is now fully compatible with both Python 2.7 and Python 3.6, so Python 3 can be used instead of Python 2.
  • Regression testing for diagnostics.
  • Improved handling of local bool variables in the mcs51 backend substantially reduces code size.
  • Large memory model for stm8 for 24-bit codespace allows using more than 32KB of Flash for code.
  • New optimizations for calls to some standard library function (printf(), puts(), strcpy()).
  • The type of true and false from stdbool.h change from int to bool.
  • New C2X mode (--std-c2x, --std-sdcc2x, #pragma std_c2x) adds support for one-argument static_assert variant.
  • Intermingling of declarations and statements (ISO C99).
  • Support headers for AX8052 devices.
  • Adopted GCC 8.2 regression tests (execute part of the GCC C torture tests).

Numerous other new features and bug fixes are included as well.

You can download the release from:
https://sourceforge.net/projects/sdcc/files/

This site is hosted by

Webmaster

Last updated:
February 20, 2020 14:02:04.

From DP

Jump to: navigation , search
  • 4Programmers
    • 4.3Build your own

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.
  • Microchip Application Libraries - Archived versions - old versions of the TCP/IP stack, USB stack.
  • Microchip Application Libraries - Current versions - TCP/IP stack, USB stack.
  • Embedded Code Source - a 'one-stop shop' where you can browse and download free, software/firmware code examples for your PIC® MCU projects.

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. JALv2 is an open source cross platform compiler running under Windows, Linux, FreeBSD and Mac OS X.Extensive libraries are available for JAL and there is an IDE called JAL Edit. There is an alternative open source IDE PicShell for Windows/Linux/others which includes a simulator supporting JAL and ASM code on the PIC 16F877, 16F876, 16F628 etc.
  • 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, Libraries

  • AVIX is a commercial RTOS based on the segmented RTOS architecture. Developed from the ground up for many of the most advanced micro controllers and fully exploits their capabilities. Available for Microchip PIC24F, dsPIC30F, dsPIC33F and PIC32MX (and ARM® Cortex-M3 based) microcontrollers.
  • 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.
  • Novo RTOS is a small kernel of code that provides a co-operative multi-tasking environment when used with the BoostC, BoostC++ or BoostBasic compiler.(Demo compilers come with a free precompiled library copy.)
  • NuttX is a real time embedded operating system for 8-bit to 32-bit MCUs. Its goals are to achieve a high degree of standards compliance (POSIX and ANSI) while maintaining a small footprint. It’s compatible with various MCU boards from a number of manufacturers including Atmel, Freescale, Renesas and Microchip. NuttX is open source under the BSD license.
  • PICOS18 is an operating system for the PICmicro microcontrollers from the Microchip PIC18 family. It is totaly free and is distributed under the GPL licence.
  • OSA is a cooperative multitasking real-time operating system (RTOS) for Microchip PIC10, PIC12, PIC16, PIC18, PIC24, dsPIC (and for Atmel AVR 8-bit microcontrollers, and for STMicroelectronics STM8).It is free and distributed under the BSD licence.
  • SmallTooth is an open source Bluetooth stack coded from scratch with an embedded device in mind. It runs on a PIC32/24.
  • 16FUSB is an open source USB 1.1 bit-banging implementation for PIC16F628/628A in assembler.
  • M-Stack is an open source USB stack for PIC16F, PIC18F, PIC24F, and PIC32MX devices.
  • Microcontrollers: From Assembly Language to C Using the PIC24 Family The PIC24 library collection: downloadable libraries, accompanied by detailed explanations in the textbook, supplemented with numerous real-world examples, and accompanied by extensive on-line documentation, enable developers to take advantage of the wide range of peripherals offered by the PIC24/dsPIC33. The collection consists of the getting started guide; the PIC24 support library; and ESOS, the Embedded Systems Operating System. Now with support for Dangerous Prototypes Web Platform!

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 (latest device file update was November 2011). 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 devices 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 or AliExpress for current clones (priced around $US 10 delivered worldwide), 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 the 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 the 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.
  • The LProg Programmer by Embed Inc (and resold by microchipDirect for $USD 20) is a low cost, light weight programmer for 3.3V PICs only (includes the 24H, 24F, 33F, and 18FJ families). The LProg is USB powered, and can provide up to 100mA Vdd current to the target plus some other enhanced features. Embed Inc programmers have an excellent reputation for quality and reliability.
  • 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

There are many designs on the web for PIC programmers. Some are clones of the Microchip programmers that use a PIC inside of the programmer. The first category of programmers use a PIC microcontroller as the core. Note: There is a chicken and egg bootstrapping problem with building your own PIC programmer that contains a PIC, you need a way of programming the PIC that goes in the programmer.

The second category of programmers is simple designs that do not contain an microcontroller such as a PIC. Typically these are serial port programmers, that require an RS-232 port that puts out at least 12 Vdc. Many laptop serial ports and USB serial port adapters cheat a bit and do not put out enough voltage for PIC high voltage programming (HVP) which needs 12-13 V. In order to go the full DIY route, a simple serial port programmer like the JDM2 could be used to program an 18Fx550 used in the PICkit 2 or ICD 2 clones.

The third category of programmers is those that contain a microcontroller other than a PIC.

Programmers built around a PIC

  • PICkit 2 clone using through-hole parts only.
  • Another PICkit 2 clone using through hole parts only.
  • $5 PICkit 2 clone through hole parts only.
  • PICkit 2 clone for 5V devices only using through hole parts only - ExpressPCB files

Programmers without an internal PIC/MCU

  • Business Card PIC Programmer - Simple JDM2 style serial port programmer posted by Ian on Instructables,com. Originally it was submitted for a Hack-a-day contest. Useful for burning the firmware for the PIC18F2550 used in PICkit 2 clones.

Programmers built around a non-PIC MCU

  • PIC32 Programmer Pt 1 and PIC32 Programmer Pt2 - Uses a cheap Chinese Arduino NANO, five resistors and a zener diode. Software used is pic32prog for Windows, Linux and OS X.

Programmers to avoid at all costs

  • The K150 (aka DIY and kits 'r us) and knockoffs. Outdated, buggy software, limited device support, very slow (see the original designer's site and the Microchip Forum thread Reasons not to buy a...!).
  • iCP01 (PICkit 2 clone) – a yellow heatshrink wrapped usb stick that destroys PICs and also itself and also its faulty ZIF socket adaptor. It appears to have NO Vdd control circuit (5V always on!) and therefore cannot reprogram chips that need the Vpp first method. Also low Vpp is reported. Source: Microchip Forums thread Reasons not to buy a...!).
  • GENIUS G540/G840 universal device programmer - It caused amazing problems simply trying to program a PIC16F84A. Also it has the manual from hell! Source: Microchip Forums thread Reasons not to buy a...!).
  • PUP-0401 (PICkit 2 'clone') - a $16.50 USD Iranian board with a ZIF socket and allegedly 3.3V capable but without all the Vdd control circuits. The product page seems to expect errors due to low Vdd! It has Severe problems programming and incompatibilities with MPLAB.Reasons not to buy a...!).
  • MCUMALL PRG-017 USB PIC programmer - non-existent documentation and atrocious support. Probably a Kits'R Us rip-off (see below).Reasons not to buy a...!).
  • Kits 'R Us DIY.... series (+ clones) - Very buggy PC application with NO possibility of future fixes as the Delphi source can no longer be compiled. Also extremely slow. Reasons not to buy a...!).

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 were the only devices initially supported by the inbuilt programmer/debugger). The following devices are now supported (presumably with later MPLAB releases): [ dsPIC33 family ] dsPIC33FJ64MC802, dsPIC33FJ128MC802 and [ PIC24H family ] PIC24HJ64GP502, PIC24HJ128GP502.
  • 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 Seeed Studio.
  • Jaluino (through hole) and Jaluino Bee (SMD) are open-source and open-hardware projects 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.
  • XINO basic for PIC and PICAXE is a very low cost (sub-$5) development system supporting the following PICAXES: 18M2, 18, 18A, 18M, 18X, 28A, 28X, 28X1, 28X2 and any similarly pinned 18 or 28 pin PICs. Available via eBay.
  • Pinguino is an open-source and open-hardware project to build an Arduino compatible board and language with a real USB microcontroller using an 8 bit PIC 18F2550 or PIC 18F4550 or a 32 bit PIC 32MX460F512L or PIC 32MX460F512L. The Pinguino IDE is based on Python and SDCC. Before the compilation, a preprocessor translates specific instructions of the Arduino language to native C instructions.
  • DuinoMite is an open-source and open-hardware computer running BASIC on an PIC 32MX795 (80MHz, 512K FLASH, 128Mb RAM, 26 pin GPIO) with Arduino shield like layout. DuinoMite allows you to program in the BASIC language (interpreted at 30,000 lines per second) and have a VGA and PS/2 keyboard interface without the need for a computer. Code is stored on the micro SD-Card or internal flash drive and may be executed on power up. You can also use the Pinguino IDE to program it with Arduino sketches or MPLAB to program it in C. Several versions are available assembled starting at Euro 19.95.
  • ChipKIT is an open-source hardware and software solution intended for beginners and users with little or no knowledge of embedded controllers who wish to explore embedded applications. The Uno32 uses a PIC32MX320F128H and the Max32 uses a PIC32MX795F512L. Both are programmed with a modified Arduino IDE called MPIDE or Microchip's MPLAB using C. Priced from $US 26.95 (Uno32).

Tutorials

  • PIC18Fxxx Tutorial A comprehensive PIC18Fxxx tutorial from a Microchip Conference (2002) - MPLAB IDE, C18 C compiler.

C++ Compiler Download

  • 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.
  • Accessing FLASH memory using C30 compiler Two articles which will help you understand the FLASH read/write process. 1: How do I read or write to FLASH in C30? 2: Using More Than 32K of Constants in C30
  • Programming PICs with a programmer An introduction to programming the Dangerous Prototypes' Bus Pirate - MPLAB IDE.
  • PIC24 Tutorial Comprehensive treatment of the PIC24: config, i/o, oscillator, timers, UARTs, I2C, ADC, SPI, PWM DAC and USB.
  • Introduction to dsPIC33 programming An introduction to programming the Dangerous Prototypes' Web Platform dsPIC33 - MPLAB IDE, C30 compiler.

List Of C++ Compilers

  • 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.

Free Open Source Compilers

  • Flying with HardWare Gallery List from the Microchip Forums - hardware related hints/tips/explanations/etc.
  • Gooligum Electronics PIC Tutorials covering the baseline and midrange PIC architectures using assembly language and freely-available C compilers.

Books (free)

mikroElektronika rather generously makes the following books which it publishes (and sells in hard copy) available online for free:

Open Source Microchip Pic C Compiler

John B. Peatman, Professor of Electrical and Computer Engineering at The Georgia Institute of Technology, also generously makes:

  • Coin-Cell-Powered Embedded Design available as a free electronic download or you can purchase it as a self-published paperback from Lulu.com. The book introduces the reader to code writing for a microcontroller via a series of template files and using Microchip's free version of their C compiler for the PIC18 family.

Pic C Compiler Open Sourcece

  • Embedded Design with the PIC18F452 Microcontroller - (a condensed version) available as a free electronic download. Introduces a template of assembly language code that encompasses a set of features of the PIC18F452 plus its interactions with some I/O devices.

Pic C Compiler Open Source File

Retrieved from 'http://dangerousprototypes.com/docs/PIC_Resources'

Comments are closed.