![](http://datasheet.mmic.net.cn/380000/-PD98405_datasheet_16745025/-PD98405_115.png)
115
CHAPTER 5 SAR FUNCTION
This chapter explains the SAR functions of the
μ
PD98405.
5.1 INITIALIZATION
(1) Initializing the chip
Before the
μ
PD98405 can function normally, it must be initialized to set the internal states and registers to
their defaults. A hardware reset is executed by inputting a low level signal to the RST_B pin. During
normal operation, the chip can be also initialized by means of a software reset. A software reset is
executed by writing to the SWR register.
The hardware and software resets have the same effect on the
μ
PD98405, such that the same status is
established after either is effected.
Caution The
μ
PD98405 requires 20 clock cycles to initialize its internal circuitry. Do not attempt to
access the
μ
PD98405 as a slave until 20 clock cycles have elapsed after a reset.
(2) Initializing the control memory
After a hardware or software reset, the
μ
PD98405 initializes the connected control memory. The
μ
PD98405 operates assuming that the maximum of 512K words (2M bytes) of control memory have been
allocated.
When a reset is effected, the
μ
PD98405 writes "0000H" to the low-order 16 bits of the last word address
("7FFFFH") as a block number, then decrements the addresses in 16-word units to 7FFEF, 7FFDF,
7FFCF, and so on, writing block numbers to the low-order 16 bits of each address 32K times each time,
decrementing the block number to 7FFF, 7FFE, 7FFD, and so on. After block number "0001H" has been
written to address "0000FH," the
μ
PD98405 writes "0000H" to address "7FFFFH" again, at which point
initialization is complete. Areas other than the block number area are not cleared to 0.
The written block number functions as a pointer to the first address of the next block. Those blocks for
which all the areas are divided by 16 words are chained. This chain information is used by the
μ
PD98405
to manage the "free block pool" of the control memory and is rewritten as necessary to open/close the VC
and transmit/receive data.