| 数据搜索系统,热门电子元器件搜索 |
|
H8/3021 数据表(PDF) 64 Page - Renesas Technology Corp |
|
|
|||||||||||||||||||||||||||||
H8/3021 数据表(HTML) 64 Page - Renesas Technology Corp |
|
64 / 712 page ![]() 2. CPU Rev.2.00 Mar. 22, 2007 Page 40 of 684 REJ09B0352-0200 2.6.5 Notes on Use of Bit Manipulation Instructions The BSET, BCLR, BNOT, BST, and BIST instructions read a byte of data, modify a bit in the byte, then write the byte back. Care is required when these instructions are used to access registers with write-only bits, or to access ports. Step Description 1 Read Read one data byte at the specified address 2 Modify Modify one bit in the data byte 3 Write Write the modified data byte back to the specified address Example 1: BCLR is executed to clear bit 0 in the port A data direction register (PADDR) under the following conditions. PA7, PA6: Input pins PA5 – PA0: Output pins The intended purpose of this BCLR instruction is to switch PA0 from output to input. Before Execution of BCLR Instruction PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0 Input/output Input Input Output Output Output Output Output Output DDR 0 0 1 1 1 1 1 1 Execution of BCLR Instruction BCLR #0, @PADDR ;Clear bit 0 in data direction register After Execution of BCLR Instruction PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0 Input/output Output Output Output Output Output Output Output Input DDR 1 1 1 1 1 1 1 0 Explanation: To execute the BCLR instruction, the CPU begins by reading PADDR. Since PADDR is a write-only register, it is read as H'FF, even though its true value is H'3F. Next the CPU clears bit 0 of the read data, changing the value to H'FE. |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| 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 |