spacer Processors

Every creation needs a brain of sorts. Some robots are built so that their sensors directly control their behaviour. This is a simple, low tech, way to build robots that exhibit some modestly interesting behaviour. Other robots utilize computers on par with current desktops to give very sophisticated abilities.

I decided to work in the lower-middle of this evolutionary tree, so to speak. I wanted some decent processing power but at a very low price. I chose to use PIC microcontrollers from MicroChip Technology Incorporated.

There are lots of other microcontroller choices. ATMel makes a good line of microcontrollers. Parallax Inc makes the propeller chip and the BASIC Stamp. There's also the Arduino which is an open-source electronics prototyping platform which you may find of interest. It uses an ATmega chip at its heart.

PIC Microcontrollers

Like most microcontrollers, PIC chips are a marvel of integration. They roll a vast array of functions into a tiny package and typically require few or no external components to run. A minimal circuit that actually does something could consist of nothing more than a PIC chip, some batteries, and an LED.

Many PIC chips have an internal clock thereby eliminating the need for an external resonator. When I started I worked with some PIC16F series PIC chips. These have since been supplemented by PIC18F chips that sport higher clock speeds, more and better functions, and in a few versions, USB support

Recently I've started working with dsPIC33 chips. While these are called Digital Signal Processors, they function pretty much like previous PIC generations. They simply are tailored to support applications that require a lot of horse power.

PIC18F1320

Picture of a 18 pin PIC18F1320 DIP packageI used this PIC for my LEDactus project. While I had intended to build more projects around this chip life doesn't always agree. Stepper motors have long been an interest of mine; making things move. I'd built a few drivers using PIC18 chips but the performance was always disappointing. Then I stumbled across a reference design by Microchip that used a dsPIC33 chip to not only step the motor phases but that also monitored phase currents, and used a PID to chop the applied voltage. Since then I've switched to surface mount and am planning on using the dsPIC33 for future projects.

In the18 pin DIP package two pins are used to supply power to the PIC leaving 16 pins for use. As with most low pin count microcontrollers, many functions are mapped onto these remaining pins. Depending on what functions within the PIC you decide to use, the pins may be inputs or outputs, digital or analog, or mapped to special functions such as serial UARTs, timers, or interrupts, etc.

Here are the basic functions contained within the PIC18F1320.

  • Run at up to 40MHz using an external clock
  • Run from 31kHz up to 8MHz using the internal clock
  • Three external interrupts
  • Enhanced pulse-width-modulation support
  • Seven channels of 10bit A/D (Analog to Digital) conversion
  • Enhanced USART for RS-232, RS-485
  • 16 I/O lines
  • 8K Flash memory for program storage
  • 256 Bytes of SRAM for variables
  • 256 Bytes of EEPROM for storage of persistent data

PIC18F2553

PIC18F2553 SOIC-28Several of Microchips PIC series support USB. I use the PIC18F2553 on those projects that require a USB link to a PC. The PIC18F2553 in turn communicates with other PICs via a serial connection.


dsPIC33FJ12MC202

dsPIC33FJ12MC202 SOIC-28This chip was used in the Microchip PID Stepper Motor Driver reference design so I gave it a try. I use the surface mount SOIC-28 version since it's big enough to easily solder.

Here are some features of this dsPIC chip.

  • External or Internal clocks
  • Runs at up to 80MHz ( 40MIPS )
  • Three external interrupts
  • Dual Enhanced pulse-width-modulation support
  • Six channels of 10bit A/D (Analog to Digital) conversion or 1 channel of 12bit A/D
  • Most peripherals can be mapped to any of 16 pins.
  • Enhanced USART for RS-232, SPI, I2C
  • 21 I/O lines
  • 12K Flash memory for program storage
  • 1024 Bytes of SRAM for variables
  • No EEPROM but program memory can be used for storage of persistent data

dsPIC33FJ16GS502

dsPIC33FJ16GS502 SOIC-28I choose this chip to use in an other project that I'm working on. It has slightly more program memory but otherwise it's very similar to the MC202 above. It does have more PWM channels and is geared more towards motor control.

Here are some features of this dsPIC chip.

  • External or Internal clocks
  • Runs at up to 80MHz ( 40MIPS )
  • Three external interrupts
  • Quad Enhanced pulse-width-modulation support
  • Eight channels of 10bit A/D (Analog to Digital) conversion
  • Most peripherals can be mapped to any of 16 pins.
  • Enhanced USART for RS-232, SPI, I2C
  • 21 I/O lines
  • 16K Flash memory for program storage
  • 2048 Bytes of SRAM for variables
  • No EEPROM but program memory can be used for storage of persistent data

Jump To : Projects