11.07.2015 Views

Builders guide robot pacman.pdf

Builders guide robot pacman.pdf

Builders guide robot pacman.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.0 Microcontroller and SoftwareOur microcontroller of choice was the Microchip PIC16F877. MicroCore-11microcontrollers using the Motorola HC11 are provided by the lab but upon furtherconsideration, they were rejected for a number of reasons. The project consists of two<strong>robot</strong>s, each of which requires a microcontroller. One MicroCore-11 costs around $100and using two would already consume half of our budget constraint of $400.Financial issues aside, its functionality were also inadequate for our purposes.Interfacing with RF requires at least 3 pins to decode the four direction signals: up, down,left, and right, and also to indicate the presence of an RF signal. Two stepper motors areused on each <strong>robot</strong> and each stepper motor driver chip requires 2 pins for stepping anddirection, for a total of 4 pins. An LCD display uses 3 pins for counting lives, score, andreset. Ghost contact and maze-dot counting require 1 pin each for a total of 2. Obstaclesensors use LEDs and this requires a minimum of 1 pin to power if we power them alltogether. This already totals to a requirement of 13 pins, which exceeds the 12 digitalpins available on the MicroCore-11.While searching for a microcontroller with a high pin count and minimal cost, we cameacross the Microchip PICmicro MCU series, with up to 32 I/O pins in the 40-pin packageand a retail price of around $10, one-tenth of the price of a MicroCore-11. Of thePICmicro series, we picked the PIC16F877 based on its popularity (a large amount ofinformation and support from hobbyists were found on the Internet) and because it hadthe largest flash memory size of its class.Drawbacks of the PIC16F877 are that its memory size is slightly small at 8K x 14 words,(although it is expandable externally) and because it is not packaged in a module like theMicroCore-11. Some of the external circuitry required on the PIC16F877 was a clockoscillator, which we chose to be at 4 MHz and a programmer to write to the flashmemory. The advantages, however, outweigh the drawbacks for our purposes eventhough we may start off more slowly because the programming could not begin until webuilt the programmer.There are essentially two software designs in the Pac-Man project—one for the Pac-Man<strong>robot</strong> and one for the Ghost. Though they are very different in functionality and as aresult, in implementation, they both play the central role in system integration. Each<strong>robot</strong> also interfaces to different hardware modules and so these modules are discussed asseparate software functions below.6.1 Pac-Man RobotThe goal of the Pac-Man <strong>robot</strong> is to receive from the user wireless control signalsto move it around the maze. Obstacle sensors <strong>guide</strong> its navigation. As it traversesthrough the maze, it collects and counts the dots on the floor and displays it on an23

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!