|
Electronics Circuits &
Tutorials |
|
|
|
|
|
|
Home >
Electronic Tutorials >
Microcontroller Tutorials >
PIC 16F877A Project Tutorial
>
What do the Pins mean? |
PIC16F877A Microcontroller Project Tutorial |
What do the Pins mean?
|
|
The pins RB0-RB7,
RC0-RC7, and RD0-RD7 are digital I/O pins. The pins CCP1 and
CCP2, which share locations with RC1 and RC2, can be used for a
PWM signal (see DC Motor tutorial). The pins AN0-AN7 are for
analog I/O (see Photoresistor tutorial). TX and RX are for
debugging I/O (see Output Messages to Computer tutorial). The
remaining pins deal with power/ground, the clock signal, and
programmer I/O.
A PIC is made of several “ports.” Each port is designated with a
letter, RB0-RB7 are a port. RC0-RC7 and RD0-RD7 are a port as
well. RA0-RA5 and RE0-RE2 are also ports, but with fewer pins.
Some of these pins have special purposes, but most can be used
as basic input/output pins.
For example, you can set pin RB0 to be either an input pin, or
an output pin. As an input pin, the digital voltage on the pin
can be read in. For example, if RB0 is connected to ground (0v),
then you would read a digital 0. If RB0 was connected to power
(5v), then you would read a digital 1.
On the other hand, if you wanted to set RBO as an output pin, you could choose
to make RB0 either be 5v, or 0v. This can be used, for example, to turn off or
on a LED, or to turn off or on a motor. |
|
|
Note: To report broken links or to submit your projects please send email to Webmaster |
|
|
|
|
Copyright ©
1999-2020
www.hobbyprojects.com
(All rights reserved) |
|