Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

PIC16F84AT-20/SSROM Datasheet(PDF) 19 Page - Microchip Technology

Part # PIC16F84AT-20/SSROM
Description  18-pin Enhanced FLASH/EEPROM 8-bit Microcontroller
PDF  88 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC16F84AT-20/SSROM Datasheet(HTML) 19 Page - Microchip Technology

Back Button PIC16F84AT-20/SSROM Datasheet HTML 15Page - Microchip Technology PIC16F84AT-20/SSROM Datasheet HTML 16Page - Microchip Technology PIC16F84AT-20/SSROM Datasheet HTML 17Page - Microchip Technology PIC16F84AT-20/SSROM Datasheet HTML 18Page - Microchip Technology PIC16F84AT-20/SSROM Datasheet HTML 19Page - Microchip Technology PIC16F84AT-20/SSROM Datasheet HTML 20Page - Microchip Technology PIC16F84AT-20/SSROM Datasheet HTML 21Page - Microchip Technology PIC16F84AT-20/SSROM Datasheet HTML 22Page - Microchip Technology PIC16F84AT-20/SSROM Datasheet HTML 23Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 19 / 88 page
background image
© 2001 Microchip Technology Inc.
DS35007B-page 17
PIC16F84A
4.2
PORTB and TRISB Registers
PORTB is an 8-bit wide, bi-directional 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
Hi-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).
EXAMPLE 4-2:
INITIALIZING PORTB
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<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.
Four of PORTB’s 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.
FIGURE 4-3:
BLOCK DIAGRAM OF
PINS RB7:RB4
FIGURE 4-4:
BLOCK DIAGRAM OF
PINS RB3:RB0
BCF
STATUS, RP0 ;
CLRF
PORTB
; Initialize PORTB by
; clearing output
; data latches
BSF
STATUS, RP0 ; Select Bank 1
MOVLW
0xCF
; Value used to
; initialize data
; direction
MOVWF
TRISB
; Set RB<3:0> as inputs
; RB<5:4> as outputs
; RB<7:6> as inputs
RBPU(1)
Data Latch
From other
P
VDD
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
Note 1:
TRISB = ’1’ enables weak pull-up
(if RBPU = ’0’ in the OPTION_REG register).
2:
I/O pins have diode protection to VDD and VSS.
I/O pin(2)
RBPU(1)
I/O pin(2)
Data Latch
P
VDD
Q
D
CK
Q
D
CK
Q
D
EN
Data Bus
WR Port
WR TRIS
RD TRIS
RD Port
Weak
Pull-up
RD Port
RB0/INT
TTL
Input
Buffer
Schmitt Trigger
Buffer
TRIS Latch
Note 1:
TRISB = ’1’ enables weak pull-up
(if RBPU = ’0’ in the OPTION_REG register).
2:
I/O pins have diode protection to VDD and VSS.



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


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   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