| Os motores de busca de Datasheet de Componentes eletrônicos |
|
H8/3021 Folha de dados(PDF) 64 Page - Renesas Technology Corp |
|
|
|||||||||||||||||||||||||||||
H8/3021 Folha de dados(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. |
|
Ligação URL |
| ALLDATASHEET é útil para você? [ DONATE ] |
Sobre Alldatasheet | Publicidade | Contato conosco | Privacy Policy | Link para a ficha técnica | roca de Link | Lista de Fabricantes 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 |