Fujitsu MB91150 Series Hardware Manual page 414

32-bit microcontroller
Table of Contents

Advertisement

CHAPTER 18 BIT-SEARCH MODULE
register.
Table 18.3-1 "Bit positions and return values (Decimal)" shows the positions of detection and
their corresponding return values. If no value change occurred, a value of 32 is returned. During
value change detection, the value 0 is not returned as result.
[Example of execution]
00100000000000000000000000000000
00000001001000110100010101100111
00000000000000111111111111111111
00000000000000000000000000000001
00000000000000000000000000000000
11111111111111111111000000000000
11111000010010011110000010101010
10000000000000101010101010101010
11111111111111111111111111111111
Table 18.3-1 Bit positions and return values (Decimal)
Detected
Return
bit
value
position
31
0
30
1
29
2
28
3
27
4
26
5
25
6
24
7
I Processing for saving and restoring
If you must save and restore the internal status of the bit-search module owing to use of the bit-
search module in the interrupt handler, follow the procedure below.
1. Unload the detection data register, and save the read contents. (Save)
2. Use the bit-search module.
3. Load the 1 detection data register with the data saved in step 1. (Restore)
The value obtained by the above operations when the detection result register is unloaded next
depends on the contents written to the bit-search module before step 1).
Even if the data register for which the last load operation is performed was the one for which
zero or a value change was detected, the above procedure provides the correct return.
398
Written data
Detected
Return
bit
value
position
23
8
22
9
21
10
20
11
19
12
18
13
17
14
16
15
Read value (In decimal notation)
(20000000
)
B
H
(01234567
)
B
H
(0003FFFF
)
B
H
(00000001
)
B
H
(00000000
)
B
H
(FFFFF000
)
B
H
(F849E0AA
)
B
H
(8002AAAA
)
B
H
(FFFFFFFF
)
B
H
Detected
Return
bit
value
position
15
14
13
12
11
10
9
8
2
7
14
31
32
20
5
1
32
Detected
bit
position
16
7
17
6
18
5
19
4
20
3
21
2
22
1
23
0
Non
existent
Return
value
24
25
26
27
28
29
30
31
32

Advertisement

Table of Contents
loading

Table of Contents