
397
CHAPTER 18 BIT-SEARCH MODULE
18.3 Operation of the Bit-Search Module
The bit-search module perform the following operations:
• 0 detection
• 1 detection
• value change detection
■
0 detection
Data loaded in the 0 detection data register is scanned from the MSB to the LSB, and the
position at which the first 0 is detected is returned. The result of detection is obtained by
unloading the detection result register. Table 18.3-1 "Bit positions and return values (Decimal)"
shows the relationship between detected positions and return values.
If the data contains no 0 (i.e., the value is FFFFFFFF
H
), a value of 32 is returned as the search
result.
[Example of execution]
■
1 detection
Data written in the 1 detection data register is scanned from the MSB to the LSB, and the
position at which first 1 is detected is returned. The result of detection is obtained by unloading
the detection result register. Table 18.3-1 "Bit positions and return values (Decimal)" shows the
relationship between detected positions and return values.
If the data contains no 1 (i.e., the value is 00000000
H
), a value of 32 is returned as the search
result.
[Example of execution]
■
Value change detection
Data loaded into the value change detection data register is scanned from bit 30 to the LSB for
comparison against the MSB value. The position at which a value different from the MSB is
detected first is returned. The result of detection is obtained by unloading the detection result
Written data
Read value (In decimal notation)
11111111111111111111000000000000
B
(FFFFF000
H
)
20
11111000010010011110000010101010
B
(F849E0AA
H
) 5
10000000000000101010101010101010
B
(8002AAAA
H
)
1
11111111111111111111111111111111
B
(FFFFFFFF
H
)
32
2
7
14
31
32
Written data
Read value (In decimal notation)
00100000000000000000000000000000
B
(20000000
H
)
00000001001000110100010101100111
B
(01234567
H
)
00000000000000111111111111111111
B
(0003FFFF
H
)
00000000000000000000000000000001
B
(00000001
H
)
00000000000000000000000000000000
B
(00000000
H
)
Содержание MB91150 Series
Страница 1: ......
Страница 2: ......
Страница 3: ...FUJITSU LIMITED FR30 32 BIT MICROCONTROLLER MB91150 Series HARDWARE MANUAL ...
Страница 4: ......
Страница 10: ...vi ...
Страница 112: ...96 CHAPTER 3 MEMORY SPACE CPU AND CONTROL UNIT ...
Страница 174: ...158 CHAPTER 5 I O PORTS Note DDRI bit 6 is a test bit Always set the bit to 0 The value read from this bit is always 0 ...
Страница 178: ...162 CHAPTER 5 I O PORTS ...
Страница 214: ...198 CHAPTER 7 16 BIT RELOAD TIMER ...
Страница 240: ...224 CHAPTER 8 PPG TIMER ...
Страница 310: ...294 CHAPTER 13 8 10 BIT A D CONVERTER ...
Страница 318: ...302 CHAPTER 14 8 BIT D A CONVERTER ...
Страница 362: ...346 CHAPTER 15 UART ...
Страница 420: ...404 CHAPTER 19 PERIPHERAL STOP CONTROL ...
Страница 428: ...412 CHAPTER 20 CALENDAR MACROS ...
Страница 503: ...487 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Страница 510: ...494 INDEX ...
Страница 512: ......