Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.COM

X  

PIC16F877A Datasheet(PDF) 46 Page - Microchip Technology

Part # PIC16F877A
Description  28/40/44-Pin Enhanced Flash Microcontrollers
Download  234 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC16F877A Datasheet(HTML) 46 Page - Microchip Technology

Back Button PIC16F877A Datasheet HTML 42Page - Microchip Technology PIC16F877A Datasheet HTML 43Page - Microchip Technology PIC16F877A Datasheet HTML 44Page - Microchip Technology PIC16F877A Datasheet HTML 45Page - Microchip Technology PIC16F877A Datasheet HTML 46Page - Microchip Technology PIC16F877A Datasheet HTML 47Page - Microchip Technology PIC16F877A Datasheet HTML 48Page - Microchip Technology PIC16F877A Datasheet HTML 49Page - Microchip Technology PIC16F877A Datasheet HTML 50Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 46 / 234 page
background image
PIC16F87XA
DS39582B-page 44
 2003 Microchip Technology Inc.
4.2
PORTB and the TRISB Register
PORTB is an 8-bit wide, bidirectional port. The corre-
sponding data direction register is TRISB. Setting a
TRISB bit (= 1) will make the corresponding PORTB
pin an input (i.e., put the corresponding output driver in
a High-Impedance mode). Clearing a TRISB bit (= 0)
will make the corresponding PORTB pin an output (i.e.,
put the contents of the output latch on the selected pin).
Three pins of PORTB are multiplexed with the In-Circuit
Debugger and Low-Voltage Programming function:
RB3/PGM, RB6/PGC and RB7/PGD. The alternate
functions of these pins are described in Section 14.0
“Special Features of the CPU”.
Each of the PORTB pins has a weak internal pull-up. A
single control bit can turn on all the pull-ups. This is per-
formed by clearing bit RBPU (OPTION_REG<7>). The
weak pull-up is automatically turned off when the port
pin is configured as an output. The pull-ups are
disabled on a Power-on Reset.
FIGURE 4-4:
BLOCK DIAGRAM OF
RB3:RB0 PINS
Four of the PORTB pins, RB7:RB4, have an interrupt-
on-change feature. Only pins configured as inputs can
cause this interrupt to occur (i.e., any RB7:RB4 pin
configured as an output is excluded from the interrupt-
on-change comparison). The input pins (of RB7:RB4)
are compared with the old value latched on the last
read of PORTB. The “mismatch” outputs of RB7:RB4
are OR’ed together to generate the RB port change
interrupt with flag bit RBIF (INTCON<0>).
This interrupt can wake the device from Sleep. The
user, in the Interrupt Service Routine, can clear the
interrupt in the following manner:
a)
Any read or write of PORTB. This will end the
mismatch condition.
b)
Clear flag bit RBIF.
A mismatch condition will continue to set flag bit RBIF.
Reading PORTB will end the mismatch condition and
allow flag bit RBIF to be cleared.
The interrupt-on-change feature is recommended for
wake-up on key depression operation and operations
where PORTB is only used for the interrupt-on-change
feature. Polling of PORTB is not recommended while
using the interrupt-on-change feature.
This interrupt-on-mismatch feature, together with soft-
ware configurable pull-ups on these four pins, allow
easy interface to a keypad and make it possible for
wake-up on key depression. Refer to the application
note, AN552, “Implementing Wake-up on Key Stroke”
(DS00552).
RB0/INT is an external interrupt input pin and is
configured using the INTEDG bit (OPTION_REG<6>).
RB0/INT is discussed in detail in Section 14.11.1 “INT
Interrupt”.
FIGURE 4-5:
BLOCK DIAGRAM OF
RB7:RB4 PINS
Data Latch
RBPU(2)
P
VDD
Q
D
CK
Q
D
CK
QD
EN
Data Bus
WR Port
WR TRIS
RD TRIS
RD Port
Weak
Pull-up
RD Port
RB0/INT
I/O pin(1)
TTL
Input
Buffer
Schmitt Trigger
Buffer
TRIS Latch
Note 1: I/O pins have diode protection to VDD and VSS.
2: To enable weak pull-ups, set the appropriate TRIS
bit(s) and clear the RBPU bit (OPTION_REG<7>).
RB3/PGM
Data Latch
From other
RBPU(2)
P
VDD
I/O pin(1)
Q
D
CK
Q
D
CK
QD
EN
QD
EN
Data Bus
WR Port
WR TRIS
Set RBIF
TRIS Latch
RD TRIS
RD Port
RB7:RB4 pins
Weak
Pull-up
RD Port
Latch
TTL
Input
Buffer
ST
Buffer
RB7:RB6
Q3
Q1
Note 1: I/O pins have diode protection to VDD and VSS.
2: To enable weak pull-ups, set the appropriate TRIS
bit(s) and clear the RBPU bit (OPTION_REG<7>).
In Serial Programming Mode


Similar Part No. - PIC16F877A

ManufacturerPart #DatasheetDescription
logo
Microchip Technology
PIC16F877A MICROCHIP-PIC16F877A Datasheet
3Mb / 234P
   28/40-pin Enhanced FLASH Microcontrollers
2003
PIC16F877A MICROCHIP-PIC16F877A Datasheet
2Mb / 234P
   28/40/44-Pin Enhanced Flash Microcontrollers
11/29/12 2001-2013
PIC16F877A MICROCHIP-PIC16F877A Datasheet
2Mb / 234P
   28/40/44-Pin Enhanced Flash Microcontrollers
07/28/03
PIC16F877A MICROCHIP-PIC16F877A Datasheet
2Mb / 234P
   28/40/44-Pin Enhanced Flash Microcontrollers
11/29/12
PIC16F877A-E MICROCHIP-PIC16F877A-E Datasheet
2Mb / 234P
   28/40/44-Pin Enhanced Flash Microcontrollers
07/28/03
More results

Similar Description - PIC16F877A

ManufacturerPart #DatasheetDescription
logo
Microchip Technology
PIC16LF876A-I MICROCHIP-PIC16LF876A-I Datasheet
2Mb / 234P
   28/40/44-Pin Enhanced Flash Microcontrollers
11/29/12
PIC16LF877A-I MICROCHIP-PIC16LF877A-I Datasheet
2Mb / 234P
   28/40/44-Pin Enhanced Flash Microcontrollers
07/28/03
PIC16F876AT-I-SO MICROCHIP-PIC16F876AT-I-SO Datasheet
2Mb / 234P
   28/40/44-Pin Enhanced Flash Microcontrollers
11/29/12
PIC16F877A-IL MICROCHIP-PIC16F877A-IL Datasheet
2Mb / 234P
   28/40/44-Pin Enhanced Flash Microcontrollers
11/29/12
PIC16F877AT-I-PTG MICROCHIP-PIC16F877AT-I-PTG Datasheet
2Mb / 234P
   28/40/44-Pin Enhanced Flash Microcontrollers
11/29/12
PIC16F877A-I-PT MICROCHIP-PIC16F877A-I-PT Datasheet
4Mb / 234P
   28/40/44-Pin Enhanced Flash Microcontrollers
07/28/03
PIC16F87XA MICROCHIP-PIC16F87XA_13 Datasheet
2Mb / 234P
   28/40/44-Pin Enhanced Flash Microcontrollers
11/29/12 2001-2013
PIC16F876A-ISP MICROCHIP-PIC16F876A-ISP Datasheet
2Mb / 234P
   28/40/44-Pin Enhanced Flash Microcontrollers
11/29/12
PIC16F873A-ISP MICROCHIP-PIC16F873A-ISP Datasheet
2Mb / 234P
   28/40/44-Pin Enhanced Flash Microcontrollers
2001-2013
PIC16F877A-E MICROCHIP-PIC16F877A-E Datasheet
2Mb / 234P
   28/40/44-Pin Enhanced Flash Microcontrollers
07/28/03
More results


Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL




Privacy Policy
ALLDATASHEET.COM
Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Datasheet Upload   |   Contact us   |   Privacy Policy   |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com