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

HD6433846XXXH 参数 Datasheet PDF下载

HD6433846XXXH图片预览
型号: HD6433846XXXH
PDF下载: 下载PDF文件 查看货源
内容描述: 微控制器\n [Microcontroller ]
分类和应用: 微控制器外围集成电路时钟
文件页数/大小: 524 页 / 1465 K
品牌: ETC [ ETC ]
 浏览型号HD6433846XXXH的Datasheet PDF文件第69页浏览型号HD6433846XXXH的Datasheet PDF文件第70页浏览型号HD6433846XXXH的Datasheet PDF文件第71页浏览型号HD6433846XXXH的Datasheet PDF文件第72页浏览型号HD6433846XXXH的Datasheet PDF文件第74页浏览型号HD6433846XXXH的Datasheet PDF文件第75页浏览型号HD6433846XXXH的Datasheet PDF文件第76页浏览型号HD6433846XXXH的Datasheet PDF文件第77页  
Example 2: BSET instruction executed designating port 3  
P37 and P36 are designated as 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 and output low-level signals. In this  
example, the BSET instruction is used to change pin P30 to high-level output.  
[A: Prior to executing BSET]  
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  
Low  
Low  
level  
Low  
level  
Low  
level  
Low  
level  
level  
level  
PCR3  
PDR3  
0
1
0
0
1
0
1
0
1
0
1
0
1
0
1
0
[B: BSET instruction executed]  
BSET #0 @PDR3  
,
The BSET instruction is executed designating port 3.  
[C: After executing BSET]  
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  
High  
level  
PCR3  
PDR3  
0
0
0
1
1
0
1
0
1
0
1
0
1
0
1
1
[D: Explanation of how BSET operates]  
When the BSET instruction is executed, first the CPU reads port 3.  
Since P37 and P36 are input pins, the CPU reads the pin states (low-level and high-level input).  
P35 to P30 are output pins, so the CPU reads the value in PDR3. In this example PDR3 has a value  
of H'80, but the value read by the CPU is H'40.  
Next, the CPU sets bit 0 of the read data to 1, changing the PDR3 data to H'41. Finally, the CPU  
writes this value (H'41) to PDR3, completing execution of BSET.  
As a result of this operation, bit 0 in PDR3 becomes 1, and P30 outputs a high-level signal.  
However, bits 7 and 6 of PDR3 end up with different values.  
58  
 复制成功!