If you just want to get started with PICs, esp. the 16F628, you might want a simple test program with circuit that does nothing else than blink a LED, go here 628LED Note: This is not by me! However, thats how I got started, and it is pretty good.
Update 20041027:
Bootloader for the PIC (18F452) derived from Microchip's Application Note AN851 and small utilities to use it under linux. (currently supports read/write/erase of flash (program) memory). For more info, check the introductions in the .asm and .c files.
Uses ihexfile.c/h from picprg, which is Copyright 1994-1998 by Brian C. Lane
Available in two fileformats:
- tar.bz2 for unix users (some windows based programs can also handle these files): an851.tar.bz2 (21k)
- zip for those stuck on windows: an851.zip (25k)
- finally, here is a windows binary: an851host.exe (33k)
- you'll also need this DLL: cygwin1.dll (1.2M)
- for easy updating of firmware,
- use the shell script (Unix) bootnew.sh (301)
- or batch file (DOS, Windows) bootnew.bat (710)
Update 20030424:
Here are the first pieces of assembler code for the MCP. Note that this is work in progress, and it is NOT complete.
- 4067.asm Simple program to let a PIC drive a 4067 with 7 segment displays hooked up to it.
- all thats needed:
- 1x PIC16F628
- 8x 330 ohm resistors
- 1x CMOS 4067
- MCP_master.asm
- right now it just sends everything received from the RS-232 serial port over to the display PIC via my bit-banging pic2pic protocol
- it allows you to set the digits of the 7 segment displays from a terminal program on the PC
- PS2controller.asm
- all it does at this moment is to initialize the mouse, and dump the packets to the serial port where I can look at them with a terminal program
- A good reference for PS/2 interfacing: Adam Chapweske's "The PS/2 Mouse/Keyboard Protocol"
For circuits head over the electronics pages. All files were tested with gputils, the GNU Pic assembler. However, they should also work fine with Microchips assembler.
To get the programs into the PICs, I used Byron Jeff's Trivial High Voltage Programmer (THVP). The electronics pages have some pics of my programmer.