Hardware Description
12/08/00 EWJOverview:
The PIC16F877 is a Microprocessor based system, including input and output (I/O) interfaces, on a single integrated circuit. This type of device is called a Microcontroller.
The '877 device contains several features that are useful when using the device to control a process. Not all of the features of the '877 are available at the same time so when the device is used in an application such as the robot choices must be made as to what features are going to be in the overall design.
The robot (I/O) features:
Ports-
Three 8 bit ports are available their functions are as follows:The 8 bit port RB:
|
Bit |
Description |
Function |
Available on expansion connector JP3 |
|
RB0 |
Spare Pushbutton Input |
Low = button pressed |
Yes (pin13) |
|
RB1 |
Beeper Output |
High = Beeper ON |
No |
|
RB2 |
Right Track Sensor |
Low = White surface |
No |
|
RB3 |
Reserved to program '877 |
NOT A USER FUNCTION |
No |
|
RB4 |
Left Track Sensor |
Low = White surface |
No |
|
RB5 |
Reserved LCD serial line |
NOT A USER FUNCTION |
No |
|
RB6 |
Reserved to program '877 |
NOT A USER FUNCTION |
No |
|
RB7 |
Reserved to program '877 |
NOT A USER FUNCTION |
No |
The 8 bit port
|
Bit |
Description |
Function |
Available on expansion connector JP3 |
|
RC0 |
Spare |
Advanced user I/O |
Yes (pin 14) |
|
RC1 |
Spare |
Advanced user I/O |
Yes (pin 16) |
|
RC2 |
Spare |
Advanced user I/O |
Yes (pin 18) |
|
RC3 |
Reserved D to A communication |
NOT A USER FUNCTION |
No |
|
RC4 |
Spare |
Advanced user I/O |
Yes (pin 15) |
|
RC5 |
Reserved D to A communication |
NOT A USER FUNCTION |
No |
|
RC6 |
Reserved D to A communication |
NOT A USER FUNCTION |
No |
|
RC7 |
Spare |
Advanced user I/O |
Yes (pin 17) |
The 8 bit port
|
Bit |
Description |
Function |
Available on expansion connector JP3 |
|
RD0 |
LED D3 / Right Motor Reverse |
High = D3 light ON and Right Motor Reverse |
No |
|
RD1 |
LED D5 / Right Motor Forward |
High = D5 light ON and Right Motor Forward |
No |
|
RD2 |
LED D6 / Left Motor Forward |
High = D6 light ON and Left Motor Forward |
No |
|
RD3 |
LED D4 / Left Motor Reverse |
High = D4 light ON and Left Motor Reverse |
No |
|
RD4 |
LED D2 |
High = D2 light ON |
No |
|
RD5 |
LED D1 |
High = D1 light ON |
No |
|
RD6 |
LED D23 |
High = D23 light ON |
No |
|
RD7 |
LED D22 |
High = D22 light ON |
No |
Analog to Digital conversion-
|
Channel |
Description |
Available on expansion connector JP3 |
|
AN0 |
Left Front Sensor |
No |
|
AN1 |
Right Front Sensor |
No |
|
AN2 |
(Battery Voltage)/3.13 |
No |
|
AN3 |
Spare analog |
Yes (pin 2) |
|
AN4 |
Spare analog |
Yes (pin 6) |
|
AN5 |
Spare analog |
Yes (pin 8) |
|
AN6 |
Spare analog |
Yes (pin10) |
|
AN7 |
Spare analog |
Yes (pin 12) |
Digital to Analog conversion-
Two outputs are provided to control the speed of each motor. These outputs take a 10 bit digital word and convert it to an analog voltage.Important links for understanding and utilizing the Robot circuitry:
Microchip
PIC16F877 datasheetMicrochip
MPLAB-ICD development systemSerial LCD:
LCD display manualD to A converter:
Linear Technologies LTC1661Motor Controller:
BA6209Schematics:
Page 1:
Microcontroller circuitryPage 2:
IR sensorsPage 3:
IR emittersPage 4:
Power and drive circuitry