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

HD6433846XXXH 参数 Datasheet PDF下载

HD6433846XXXH图片预览
型号: HD6433846XXXH
PDF下载: 下载PDF文件 查看货源
内容描述: 微控制器\n [Microcontroller ]
分类和应用: 微控制器外围集成电路时钟
文件页数/大小: 524 页 / 1465 K
品牌: ETC [ ETC ]
 浏览型号HD6433846XXXH的Datasheet PDF文件第71页浏览型号HD6433846XXXH的Datasheet PDF文件第72页浏览型号HD6433846XXXH的Datasheet PDF文件第73页浏览型号HD6433846XXXH的Datasheet PDF文件第74页浏览型号HD6433846XXXH的Datasheet PDF文件第76页浏览型号HD6433846XXXH的Datasheet PDF文件第77页浏览型号HD6433846XXXH的Datasheet PDF文件第78页浏览型号HD6433846XXXH的Datasheet PDF文件第79页  
2. Bit manipulation in a register containing a write-only bit  
Example 3: BCLR instruction executed designating port 3 control register PCR3  
As in the examples above, P37 and P36 are input pins, with a low-level signal input at P37 and a  
high-level signal at P36. The remaining pins, P35 to P30, are output pins that output low-level  
signals. In this example, the BCLR instruction is used to change pin P30 to an input port. It is  
assumed that a high-level signal will be input to this input pin.  
[A: Prior to executing BCLR]  
P37  
P36  
P35  
P34  
P33  
P32  
P31  
P30  
Input/output  
Pin state  
Input  
Input  
Output  
Output  
Output  
Output  
Output  
Output  
Low  
level  
High  
level  
Low  
level  
Low  
level  
Low  
level  
Low  
level  
Low  
level  
Low  
level  
PCR3  
PDR3  
0
1
0
0
1
0
1
0
1
0
1
0
1
0
1
0
[B: BCLR instruction executed]  
BSET #0 @PCR3  
,
The BCLR instruction is executed designating PCR3.  
[C: After executing BCLR]  
P37  
P36  
P35  
P34  
P33  
P32  
P31  
P30  
Input/output  
Pin state  
Output  
Output Output  
Output  
Output  
Output  
Output  
Input  
Low  
level  
High  
level  
Low  
level  
Low  
level  
Low  
level  
Low  
level  
Low  
level  
High  
level  
PCR3  
PDR3  
1
1
1
0
1
0
1
0
1
0
1
0
1
0
0
0
[D: Explanation of how BCLR operates]  
When the BCLR instruction is executed, first the CPU reads PCR3. Since PCR3 is a write-only  
register, the CPU reads a value of H'FF, even though the PCR3 value is actually H'3F.  
Next, the CPU clears bit 0 in the read data to 0, changing the data to H'FE. Finally, this value  
(H'FE) is written to PCR3 and BCLR instruction execution ends.  
As a result of this operation, bit 0 in PCR3 becomes 0, making P30 an input port. However, bits 7  
and 6 in PCR3 change to 1, so that P37 and P36 change from input pins to output pins.  
60  
 复制成功!