전자부품 데이터시트 검색엔진
  Korean  ▼
ALLDATASHEET.CO.KR

X  

PIC16C770-04/P 데이터시트(PDF) 35 Page - Microchip Technology

부품명 PIC16C770-04/P
상세설명  18/20-Pin, 8-Bit CMOS Microcontrollers with 10/12-Bit A/D
PDF  200 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
제조업체  MICROCHIP [Microchip Technology]
홈페이지  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC16C770-04/P 데이터시트(HTML) 35 Page - Microchip Technology

Back Button PIC16C770-04/P Datasheet HTML 31Page - Microchip Technology PIC16C770-04/P Datasheet HTML 32Page - Microchip Technology PIC16C770-04/P Datasheet HTML 33Page - Microchip Technology PIC16C770-04/P Datasheet HTML 34Page - Microchip Technology PIC16C770-04/P Datasheet HTML 35Page - Microchip Technology PIC16C770-04/P Datasheet HTML 36Page - Microchip Technology PIC16C770-04/P Datasheet HTML 37Page - Microchip Technology PIC16C770-04/P Datasheet HTML 38Page - Microchip Technology PIC16C770-04/P Datasheet HTML 39Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 35 / 200 page
background image
PIC16C717/770/771
© 1999 Microchip Technology Inc.
Advanced Information
DS41120A-page 35
TABLE 3-2:
SUMMARY OF REGISTERS ASSOCIATED WITH PORTA
3.3
PORTB and the TRISB Register
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 3-2:
INITIALIZING PORTB
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
MOVLW
03
; Set RB<1:0> as analog
inputs
MOVWF
ANSEL
;
BCF
STATUS, RP0
; Return to Bank 0
Each of the PORTB pins has an internal pull-up, which
can be individually enabled from the WPUB register. A
single global enable bit can turn on/off the enabled pull-
ups. Clearing the RBPU bit, (OPTION_REG<7>),
enables the weak pull-up resistors. 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.
Each of the PORTB pins, if configured as input, also
has an interrupt on change feature, which can be indi-
vidually selected from the IOCB register. The RBIE bit
in the INTCON register functions as a global enable bit
to turn on/off the interrupt on change feature.
The
selected inputs are compared to the old value latched
on the last read of PORTB. The "mismatch" outputs are
OR’ed together to generate the RB Port Change Inter-
rupt with flag bit RBIF (INTCON<0>).
This interrupt can wake the device from SLEEP. The
user, in the interrupt service routine, can clear the inter-
rupt 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.
REGISTER 3-2:
WEAK PULL UP PORTB REGISTER (WPUB: 95h)
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Value on:
POR,
BOR
Value on all
other resets
05h
PORTA
RA7
RA6
RA5
RA4
RA3
RA2
RA1
RA0
xxxx 0000
uuuu 0000
85h
TRISA
PORTA Data Direction Register
1111 1111
1111 1111
9Dh
ANSEL
ANS5
ANS4
ANS3
ANS2
ANS1
ANS0
1111 1111
1111 1111
Legend: x = unknown, u = unchanged, - = unimplemented locations read as ’0’. Shaded cells are not used by PORTA.
R/W-1
R/W-1
R/W-1
R/W-1
R/W-1
R/W-1
R/W-1
R/W-1
WPUB7
WPUB6
WPUB5
WPUB4
WPUB3
WPUB2
WPUB1
WPUB0
R =
Readable bit
W = Writable bit
U =
Unimplemented bit, read
as ‘0’
-n =
Value at POR reset
bit7
bit0
bit 7-0:
WPUB<7:0>: PORTB Weak Pull-Up Control
1
= Weak pull up enabled.
0
= Weak pull up disabled
Note 1: For the WPUB register setting to take effect, the RBPU bit in the OPTION_REG Register must be cleared.
2: The weak pull up device is automatically disabled if the pin is in output mode (TRIS = 0).



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


데이터시트 다운로드

Go To PDF Page


링크 URL



ALLDATASHEET 가 귀하에 도움이 되셨나요?  [ DONATE ] 

Alldatasheet는?   |   광고문의   |   운영자에게 연락하기   |   개인정보취급방침   |   링크 투 데이터시트    |   링크교환   |   제조사별 검색
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