欢迎访问ic37.com |
会员登录 免费注册
发布采购

PIC18C452-I/L 参数 Datasheet PDF下载

PIC18C452-I/L图片预览
型号: PIC18C452-I/L
PDF下载: 下载PDF文件 查看货源
内容描述: 高性能微控制器,10位A / D [High-Performance Microcontrollers with 10-Bit A/D]
分类和应用: 微控制器
文件页数/大小: 296 页 / 4835 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC18C452-I/L的Datasheet PDF文件第79页浏览型号PIC18C452-I/L的Datasheet PDF文件第80页浏览型号PIC18C452-I/L的Datasheet PDF文件第81页浏览型号PIC18C452-I/L的Datasheet PDF文件第82页浏览型号PIC18C452-I/L的Datasheet PDF文件第84页浏览型号PIC18C452-I/L的Datasheet PDF文件第85页浏览型号PIC18C452-I/L的Datasheet PDF文件第86页浏览型号PIC18C452-I/L的Datasheet PDF文件第87页  
PIC18CXX2  
make a pin an input. The user should refer to the corre-  
sponding peripheral section for the correct TRIS bit set-  
tings.  
8.3  
PORTC, TRISC and LATC Registers  
PORTC is an 8 bit wide bi-directional port. The corre-  
sponding Data Direction Register is TRISC. Setting a  
TRISC bit (=1) will make the corresponding PORTC pin  
an input, (i.e., put the corresponding output driver in a  
hi-impedance mode). Clearing a TRISC bit (=0) will  
make the corresponding PORTC pin an output, (i.e.,  
put the contents of the output latch on the selected pin).  
The pin override value is not loaded into the TRIS reg-  
ister. This allows read-modify-write of the TRIS register,  
without concern due to peripheral overrides.  
EXAMPLE 8-3: INITIALIZING PORTC  
CLRF  
PORTC  
; Initialize PORTC by  
; clearing output  
; data latches  
The Data Latch register (LATC) is also memory  
mapped. Read-modify-write operations on the LATC  
register reads and writes the latched output value for  
PORTC.  
CLRF  
LATC  
; Alternate method  
; to clear output  
; data latches  
PORTC is multiplexed with several peripheral functions  
(Table 8-5). PORTC pins have Schmitt Trigger input  
buffers.  
MOVLW 0xCF  
; Value used to  
; initialize data  
; direction  
MOVWF TRISC  
; Set RC<3:0> as inputs  
; RC<5:4> as outputs  
; RC<7:6> as inputs  
When enabling peripheral functions, care should be  
taken in defining TRIS bits for each PORTC pin. Some  
peripherals override the TRIS bit to make a pin an out-  
put, while other peripherals override the TRIS bit to  
FIGURE 8-7: PORTC BLOCK DIAGRAM (PERIPHERAL OUTPUT OVERRIDE)  
Peripheral Data Out  
RD LATC  
Data Bus  
1
RC7: RC0  
D
Q
Q
WR LATC or  
WR PORTC  
0
CK  
Peripheral Out  
Select  
RD TRISC  
Peripheral Output Enable  
D
Q
Q
WR TRISC  
CK  
Q
Q
D
ST Buffer  
CK  
RD PORTC  
Peripheral Data In  
7/99 Microchip Technology Inc.  
Preliminary  
DS39026B-page 83  
 复制成功!