PIC Microcontroller

From Mech
Jump to navigationJump to search

Introduction

PIC microcontrollers are produced by the company Microchip Technology Inc. They produce a full line of chips ranging from 6 to 80 pins with a range of memory capacities, speeds, interfaces and peripherals. They are useful for small mechatronics projects because of their small size, low cost, and I/O capabilities.

Chips

Here is some documentation on PICs available in the lab.

  • PIC16F684 - The PIC16F684 is a 14-pin/8-bit flash memory-based PIC. It features 4-channel PWM, 12 pins of programmable I/O, a 20MHz clock, uses less than 1 mW of power and costs about $3 each. It was purchased for the lab to function as a dedicated mid-level motor controller chip. (Digikey Part #: PIC16F684-I/P-ND)

Below is a list of other chips that could be considered in addition to the PICs available in the lab.

  • PIC18F2431 - High Performance PWM and A/D 28-pin chip (Digikey # PIC18F2431-I/SP-ND $9.70)
    • 40 MHz SDIP
    • 6 channels of PWM
    • - for negative voltage inputs
    • 2 Phase/1 Index Encoder Input w/ Position/Velocity measurement
    • Special Hall Sensor interface
    • works with PICkit 2 (Digikey # DV164120-ND $50)
    • Compatible with PIC16 code

Programming

Kits

Microchip makes various kits for progrmaming PIC chips. Using Microchip's MPLAB software, you can write, simulate and program your code.

  • PICkit 1 - One of the simplest and easiest is the PICkit. It uses a USB interface to connect the PIC to a PC and supports 8 and 14-pin PICs. It is a low-cost solution at $36/kit. (Digikey # DV164101-ND)
  • PICkit 2 - supports more advanced PICs. Also USB, slightly more expensive at $50. (Digikey # DV164120-ND)

Coding

Here are some good links for programming:

Here is a table of instructions:

PIC instructions.png