AD6654/PCB Analog Devices Inc, AD6654/PCB Datasheet - Page 67
![no-image](/images/manufacturer_photos/0/0/57/analog_devices_inc_sml.jpg)
AD6654/PCB
Manufacturer Part Number
AD6654/PCB
Description
BOARD EVALUATION FOR AD6654
Manufacturer
Analog Devices Inc
Datasheet
1.AD6654CBCZ.pdf
(88 pages)
Specifications of AD6654/PCB
Module/board Type
Evaluation Board
For Use With/related Products
AD6554
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
PROGRAMMING INDIRECT ADDRESSED REGISTERS
USING SERIAL PORT
This section gives examples for programming CRCF coefficient
RAM (with an indirect addressing scheme) using the serial port
(either SPI or SPORT modes). Though the following specific
examples are for CRCF coefficient RAM programming, they can
be extended to other indirect addressed registers like DRCF
coefficient RAM. There are four possible programming scenarios,
and examples are given for all scenarios using two commands:
SerialWrite(data) and SerialRead. These commands signify an 8-
bit write to, or an 8-bit read from, the serial port (SPI or SPORT).
SerialWrite(8-bit number): is an 8-bit write to SPI or SPORT. In
SPI mode, the SCLK is toggled eight times while SCS is pulled low.
In SPORT mode, SCS is pulled low, SRFS is held high for one
SCLK cycle, and eight bits of data are shifted into the SDI pin
following the SRFS pulse. Though the 8-bit number argument
shown in the following code is always shown MSBFIRST, it is
written with MSB shifting into the device first in MSBFIRST
mode, and it is written with LSB shifting into the device first in
LSBFIRST mode.
SerialRead(): is an 8-bit read from the SDO pin in SPI or SPORT
modes. In SPI mode, the SCLK toggles eight times while SCS is
low. In SPORT mode, SCS is pulled low, STFS is held high for one
SCLK cycle, and then the eight bits of data that shifted out on
SDO following the STFS pulse are read. The data shifted out
should be interpreted based on the polarity of the MSBFIRST pin.
Rev. 0 | Page 67 of 88
MSBFIRST Mode Using Single Byte Block Transfers
SerialWrite(0x98); //CRCF Start Address
SerialWrite(0x01);
SerialWrite(0x00);
SerialWrite(0x99); //CRCF Final Address
SerialWrite(0x01);
SerialWrite(N-1);
for (i=0 ; i < N; i++) {
}
SerialWrite(0x98); //CRCF Start Address
SerialWrite(0x01);
SerialWrite(0x00);
SerialWrite(0x99); //CRCF Final Address
SerialWrite(0x01);
SerialWrite(N-1);
for (i=0 ; i < N; i++) {
}
SerialWrite(0x9E);
SerialWrite(0x01);
//data bits[23:16]
SerialWrite(coeff[i] >> 16 & 0xFF);
SerialWrite(0x9D);
SerialWrite(0x01);
//data bits[15:8]
SerialWrite(coeff[i] >> 8 & 0xFF);
SerialWrite(0x9C);
SerialWrite(0x01);
//data bits[7:0]
SerialWrite(coeff[i] & 0xFF);
SerialWrite(0x9E);
SerialWrite(0x81);
//data bits[23:16]
Coeff[i] = SerialRead() << 16;
SerialWrite(0x9D);
SerialWrite(0x81);
//data bits[15:8]
Coeff[i] |= SerialRead() << 8;
SerialWrite(0x9C);
SerialWrite(0x81);
//data bits[7:0]
Coeff[i] |= SerialRead();
//N is the number of coefficients
//N is the number of coefficients
//writing registers
//MSB written first
//LSB written last
//reading registers
//MSB readback first
//LSB readback last
AD6654