參數(shù)資料
型號: PCM18XT0
廠商: Microchip Technology
文件頁數(shù): 45/183頁
文件大?。?/td> 0K
描述: MODULE PROC PIC18F4685
標準包裝: 1
附件類型: 處理器模塊
適用于相關產(chǎn)品: ICE2000
產(chǎn)品目錄頁面: 658 (CN2011-ZH PDF)
配用: ICE2000-ND - EMULATOR MPLAB-ICE 2000 POD
相關產(chǎn)品: DVA18XP400-ND - DEVICE ADAPTER 18F4220 PDIP 40LD
DVA18XP280-ND - DEVICE ADAPTER 18F2220 PDIP 28LD
DVA18PQ440-ND - DEVICE ADAPTER 18F4220 TQFP 44LD
第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頁第101頁第102頁第103頁第104頁第105頁第106頁第107頁第108頁第109頁第110頁第111頁第112頁第113頁第114頁第115頁第116頁第117頁第118頁第119頁第120頁第121頁第122頁第123頁第124頁第125頁第126頁第127頁第128頁第129頁第130頁第131頁第132頁第133頁第134頁第135頁第136頁第137頁第138頁第139頁第140頁第141頁第142頁第143頁第144頁第145頁第146頁第147頁第148頁第149頁第150頁第151頁第152頁第153頁第154頁第155頁第156頁第157頁第158頁第159頁第160頁第161頁第162頁第163頁第164頁第165頁第166頁第167頁第168頁第169頁第170頁第171頁第172頁第173頁第174頁第175頁第176頁第177頁第178頁第179頁第180頁第181頁第182頁第183頁
2011 Microchip Technology Inc.
DS39931D-page 139
PIC18F46J50 FAMILY
10.3
PORTB, TRISB and LATB
Registers
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).
The Data Latch register (LATB) is also memory
mapped. Read-modify-write operations on the LATB
register read and write the latched output value for
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
performed by clearing bit, RBPU (INTCON2<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 POR. The integrated weak pull-ups
consist of a semiconductor structure similar to, but
somewhat different, from a discrete resistor. On an
unloaded I/O pin, the weak pull-ups are intended to
provide logic high indication, but will not necessarily
pull the pin all the way to VDD levels.
Four of the PORTB pins (RB<7:4>) have an interrupt-
on-change feature. Only pins configured as inputs can
cause this interrupt to occur (i.e., any RB<7:4> pin
configured as an output is excluded from the interrupt-
on-change comparison). The input pins (of RB<7:4>)
are compared with the old value latched on the last
read of PORTB. The “mismatch” outputs of RB<7:4>
are ORed together to generate the RB Port Change
Interrupt with Flag bit, RBIF (INTCON<0>).
This interrupt can wake the device from Sleep mode or
any of the Idle modes. Application software can clear
the interrupt flag by following these steps:
1.
Any read or write of PORTB (except with the
MOVFF (ANY), PORTB
instruction).
2.
Wait one instruction cycle (such as executing a
NOP
instruction).
3.
Clear flag bit, RBIF.
A mismatch condition continues to set flag bit, RBIF.
Reading PORTB will end the mismatch condition and
allow flag bit, RBIF, to be cleared after one instruction
cycle of delay.
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.
The RB5 pin is multiplexed with the Timer0 module
clock input and one of the comparator outputs to
become the RB5/PMA0/KBI1/SDI1/SDA1/RP8 pin.
EXAMPLE 10-3:
INITIALIZING PORTB
Note:
On a POR, the RB<3:0> bits are
configured as analog inputs by default and
read as ‘0’; RB<7:4> bits are configured
as digital inputs.
MOVLW
0x08
; Initialize output data
MOVWF
LATB
; latch values for digital
; output pins.
MOVLB
0x0F
; ANCONx registers are
; not in access bank
BSF
ANCON1, PCFG12, BANKED
; Configure RB0/AN12 for digital input mode
BCF
ANCON1, PCFG10, BANKED
; Configure RB1/AN10 for analog input mode
MOVLW
0xC3
; RB0 configured as digital input
MOVWF
TRISB
; RB1 configured as analog input
; RB2 configured as output low
; RB3 configured as output high
; RB4 configured as output low
; RB5 configured as output low
; RB6 configured as digital input
; RB7 configured as digital input
相關PDF資料
PDF描述
MAX6220ASA-5.0+T IC VREF SERIES PREC 5V 8-SOIC
RPP20-4824DW-F CONV DC/DC 20W 18-75VIN +/-24VOU
GCC31DCSH-S288 CONN EDGECARD 62POS .100 EXTEND
XRP2525ID-1-F IC PWR SW USB 3.0 SINGLE NSOIC8
PCM16XV0 PROCESSOR MODULE FOR 16F8XXA
相關代理商/技術參數(shù)
參數(shù)描述
PCM-19 功能描述:電線鑒定 1.5" VINYL CLOTH #19 RoHS:否 制造商:TE Connectivity / Q-Cees 產(chǎn)品:Labels and Signs 類型: 材料:Vinyl 顏色:Blue 寬度:0.625 in 長度:1 in
PCM-1-9 制造商:Panduit Corp 功能描述:Cable Markers Vinyl Cloth White 制造商:Panduit Corp 功能描述:CBL ACC WIRE MARKER CARD VINYL CLOTH BLK/WHITE - Labels that come on sheets or rolls
PCM-190 功能描述:電線鑒定 Pre-Printed WM Card, Vinyl Cloth, .22" W RoHS:否 制造商:TE Connectivity / Q-Cees 產(chǎn)品:Labels and Signs 類型: 材料:Vinyl 顏色:Blue 寬度:0.625 in 長度:1 in
PCM-1900-06 制造商:PREMIER FARNELL 功能描述:6 NULL MODEM DB25 M/F CABLE
PCM-1900-1924 制造商:Panduit Corp 功能描述: