Things of Interest to PIC Users
I like the PIC processors from Microchip. Yes, I've used the ATMEL AVR chips. Yes, I've used the 8051 chips from Dallas, Yes, I've used the MC68HC11 from Motorola. But I just keep coming back to these PICs. They are darn simple to hook up, easily programmed, and pretty simple to understand. And the development tools are free. That's a big win and I appreciate it. I created this page to try to create a 'linking' page for things that would be of interest to PIC users on my site (and elsewhere).
Projects:
- Servo Gizmo - This is a pretty general purpose PIC based board. From it I've built these:
- Ant Weight ESC - A small speed controller for 1 amp DC motors.
- LCD Diagnostic Console - Your basis serial port hooked up to an LCD hack.
- Relay/Solenoid Actuator - Good for running weapons on your BattleBot.
- My First ESC - Not a very good example these days. The PIC code is great (and can run on a PIC16F628!) but the FET version which everyone seems to like has some serious limitations.
- USB PIC Programmer - Assembling the KitsRus kit for a handy PIC programmer.
Software:
- 16Bits.inc -- These are some macros that let you deal with 16 bit quantities, included are:
MOV16 Reg1, Reg2 Move a 16 bit value from Reg1 to Reg2 CMP16 Reg1, Reg2 Compare Reg1 to Reg2 and set C and Z appropriately CMPI16 Reg1, Imm Compare Reg1 to immediate value Imm and set C and Z appropriately. MOVI16 Imm, Reg1 Move immediate value Imm into Reg1 CLR16 Reg1 Clear Reg1 to 0 INC16 Reg1 Increment 16 bit value at Reg1 by 1 DEC16 Reg1 Decrement 16 bit value at Reg1 by 1 LSR16 Reg1 Logical Right shift (zero fill) Reg 1 LSL16 Reg1 Logica Left shift (zero fill) of Reg 1 SUB16 Reg1, Reg2 Subtract Reg2 from Reg1 and leave in Reg1, implements the expression:
Reg1 = Reg1 - Reg2SUBI16 Reg1, Imm Subtract the immediate value Imm from Reg1 and leave in Reg1. This implements the expression:
Reg1 = Reg1 - ImmADD16 Reg1,Reg2 Add the value in Reg1 to the value in Reg2 and leave the result in Reg1. This implements the expression:
Reg1 = Reg1 + Reg2ADDI16 Reg1,Imm Add the immediate value Imm to Reg1 and store the result in Reg1. This implements the expression:
Reg1 = Reg1 + Imm
- DIV16.ASM -- This file implements a 16 bit x 16 bit unsigned divide function for the PIC.
- LCD.ASM -- This is a collection of routines that make it easy to hook a PIC up to an HD77480 controlled LCD with only 6 pins of I/O.