RSS Feed Email Facebook Twitter Stumbleupon Google Bookmark

PIC Compendium

I have a bit of a love-hate relationship with PICs. The devices are readily available, reasonably priced, very fast, and come in lots of variations. However, the architecture itself is awkward to say the least, with small memory maps, poor support for compilers, and byzantine assembly language. Support is awesome, though, both from Microchip and numerous third parties.

The PIC family includes the 8-pin PIC12Cxxx family, the original PIC16C5x family, the workhorse PIC16Cxxx family, the higher-end PIC17Cxxx family, and the latest PIC18Cxxx family, which supports a much larger memory map and is supposed to be more compiler-friendly, while retaining backwards compatability with older members of the PIC line. Flash-based PIC are also finally becoming available.

See Also: PIC Books, PIC C Compilers

PIC Links

  • Microchip

    Microchip's home page, featuring PIC stuff, as well as info on other Microchip products, including EPROMs, EEPROMs, RDID devices, securioty devices, and analog ICs. Shortcuts to PIC info: Literature, Application Notes, and Development Tools.

  • Eric's PIC Page

    Eric Smith's collection of PIC resources, plus a fine collection of PIC source code and project notes.

  • PIC / Scenix Dev'rs

    Jeff Frohwein's site has an awesome quantity PIC information, all of it meticulously categorized and described. Applications of all types, information of development hardware and software, and links to other PIC information and tutorials.

  • The PICList

    An outstanding resource for PIC enthusiasts, this mailing list boasts thousands of members, offering help on everything related to PICs. Visit this page to subscribe to the list, or check out the FAQ or search the PICList Archive.

  • Tom Coonan

    Tom is the author of a number of PIC-related goodies, including a Verilog Synthetic PIC, a VHDL Synthetic PIC, a PIC LCD Controller, and an archive of PIC source code.

PIC Development Tools







PIC16C64/65/74 Bug Alert!

There is a very serious bug with the parallel slave port (PSP) feature of the PIC. It seems that use of the RETURN instruction clears the IBF (input buffer full) flag, so that writes to the PSP may be missed. The work-around is to use the RETLW (return literal) instruction rather than RETURN. I did this by adding a

#asm " retlw 0"

line just before the end of each of my functions. Unfortunately, this makes it a little difficult to return variable values from functions. I ended up passing the return values thru temporary globals, which is a kludge, but it does work. Also, this wastes a byte each time it's used, since the compiler insists on adding a RETURN at the end of each function.

This problem has apparently been fixed in rev 'A' silicon, but if you happen to get hold of some old stock, watch out...

Once the IBF problem was overcome, the PSP worked fine. The slave port provides a very convenient way to connect the PIC to a host processor (in my case, a 68HC11F1). The PIC can be connected directly to the microprocessor bus, and be read from and written to like a normal peripheral device. In fact, the strategy I used was to emulate a device like a UART, where there is a bank of registers which the HC11 can read and write. To do this I just used a block of RAM, and set the PSP up to interrupt the PIC whenever the HC11 accessed the port. The HC11 writes a register address to the PSP, then either reads from or writes to that register with the next byte transfer. It's pretty slick ...

blog comments powered by Disqus