A (2:0) Name Comment: Access Protocols Write Pseudocode
A (2:0) Name Comment: Access Protocols Write Pseudocode
A (2:0) Name Comment: Access Protocols Write Pseudocode
REV. A –31–
AD6620
Read Pseudocode Auto Increment Feature
int read_micro(ext_address); To increase throughput, an auto increment feature is provided.
main(); This feature is controlled by Bits 6 and 7 of the AMR. If these
{ bits are set to 00, the address remains the same after an internal
/* This code shows the reading of the NCO frequency register access. If set to 01, the address is incremented after a read access
using the read_micro function as defined above. The variable has been performed. If set to 10, the address is incremented
address is the External Address A[2..0] and data is the value to after a write access is performed. If set to 11, the address is incre-
be placed in the external interface register. The NCO register is mented after each access, read or write. This allows the AD6620
located at Internal Address = 0x303. to be initialized in a much shorter time since the access to the
*/ LAR and AMR must occur only once to initialize or read-back
// holding registers for NCO byte wide access data the entire device.
int d3, d2, d1, d0;
MICROPORT CONTROL
// NCO frequency word (32-bits wide) External reads and writes are accomplished in one of two modes
// write AMR via the Microprocessor Port. The CS, RD (DS), RDY (DTACK),
write_micro(7, 0x03 ); WR (R/W) and MODE pins are used to control the access. The
specific function of these pins depends on whether the access is
// write LAR MODE 0 or MODE 1. The Mode 1 signal names are those
write_micro(6, 0x03); listed on the pinout. The access mode is controlled by the
MODE input as described in the following sections.
/* read D[7:0] from DR0, All data is moved from the Internal
Registers to the interface registers on this access. Reading
Table XII. Microprocessor Control Signals
should be initiated with a read from DR0. Therefore, DR1,
DR2 and DR3 can be read after DR0 */ MODE 0 MODE 1
d0 = read_micro(0) & 0xFF;
A[2:0] (Address Lines) A[2:0] (Address Lines)
// read D[15:8] from DR1 D[7:0] (Data Lines) D[7:0] (Data Lines)
d1 = read_micro(1) & 0xFF; CS (Chip Select) CS (Chip Select)
// read D[23:16] from DR2 RD (Read Strobe) DS (Data Strobe)
d2 = read_micro(2) & 0xFF; WR (Write Strobe) R/W (Read/Write Select)
RDY (Ready Signal) DTACK (Data Acknowledge)
// read D[31:24] from DR3 MODE (Mode Select) MODE (Mode Select)
d3 = read_micro(3) & 0xFF;
The Microport is synchronous with the master clock (CLK) of
// DR4 is not needed because NCO_FREQ is only 32-bits
the AD6620, but the interface is not required to be. If the speed
// Assemble 32-bit NCO_FREQ word from the 4 byte of the interface is significantly slower than CLK, synchronicity
components should not be an issue. If the interface is relatively fast com-
NCO_FREQ = d0 + (d1 << 8) + (d2 << 16) + (d3 << 24); pared to CLK, the user may need to synchronize the Microport
to CLK or add wait states to the controlling processor. The
} // end of main timing diagrams show the relationship of the control signals to
clock and the user should use these as a guide to implement a
Microport interface.
–32– REV. A
AD6620
Mode = 0 is accessing the chip, the RDY line goes low at the start of
If MODE is low during the access, the interface is in Mode 0. the access. When the internal cycle is complete the RDY line
In Mode 0 the CS, RD and the WR lines control the access is released.
type. While an access is being performed, or if the serial port
t DD t HC
WR2
t SC
RD2
t HC
CS3
t ZD
t ZR
D[7:0] DATA VALID
t SAM t HA
t RDY
t RDY
RDY1
NOTES:
1 RDY IS DRIVEN LOW ASYNCHRONOUSLY BY RD AND CS GOING LOW AND RETURNS HIGH ON THE RISING EDGE
OF CLK "N+3" FOR INTERNAL ACCESS (A[2:0] = 000), CLK "N+2" OTHERWISE.
2 THE SIGNAL, WR, MAY REMAIN HIGH AND RD MAY REMAIN LOW TO CONTINUE READ MODE.
3 CS MUST RETURN TO HIGH STATE AND BE SAMPLED BY CLK (N+4 SHOWN) TO COMPLETE READ.
WR2
RD2
t SC
t HC
CS3
t SAM t HM
t SAM t HA
t RDYL t RDYH
RDY
NOTES:
1 RDY IS DRIVEN LOW ASYNCHRONOUSLY BY WR AND CS GOING LOW AND RETURNS HIGH ON THE
RISING EDGE OF CLK "N+2".
2 THESE SIGNALS (R/W AND DS) MAY REMAIN IN LOW STATE TO CONTINUE WRITING DATA.
3 CS MUST RETURN TO HIGH STATE AND BE SAMPLED BY CLK (N+3 SHOWN) TO COMPLETE WRITE.
*THE NEXT WRITE MAY BE INITIATED ON CLK, N.
R/W2 t SC
DS2
t SC t HC
CS3
t ZD
t ZR
D[7:0] DATA VALID
t SAM t HA
t DTACK t DTACK
DTACK
NOTES:
1 DTACK IS DRIVEN LOW ON THE RISING EDGE OF CLK "N+3" FOR INTERNAL ACCESS (A[2:0] = 000),
R/W2
DS2
t SC t HC
CS3
t SAM t HM
t SAM t HA
t DTACK
DTACK
t DTACK
NOTES:
1 ON RISING EDGE OF "N+3" CLK, DTACK IS DRIVEN LOW.
2 THESE SIGNALS (R/W AND DS) MAY REMAIN IN LOW STATE TO CONTINUE WRITING DATA.
3 CS MUST RETURN TO HIGH STATE AND BE SAMPLED BY CLK (N+3 SHOWN) TO COMPLETE WRITE