SC5312A Operating & Programming Manual
Rev 1.0.2
17
Q
U E R Y I N G T H E
S C 5 3 1 2 A :
W
R I T I N G T O
R
E Q U E S T
R
E G I S T E R S
The registers to read data back from the device (such as device status) are accessed through the
sc5312a_RegRead
function. The function and parameter format for this command is
sc5312a_RegRead(deviceHandle, registerCommand, instructWord,*dataOut)
. Any instructions in
addition to the register call are
placed into “instructWord”, and data obtained from the device is returne
d
via the pointer value
dataOut
. The set of request registers are shown in Table 3.
Table 3. Query registers.
Register Name
Register
Address
Serial
Range
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
GET_TEMPERATURE
0x20
[7:0]
Open
Open
Open
Open
Open
Open
Open
Open
GET_DEVICE_STATUS
0x21
[7:0]
Open
Open
Open
Open
Open
Open
Open
Open
USER EEPROM_READ
0x23
[7:0]
EEPROM Address [7:0]
[15:8]
EEPROM Address [15:8]
CAL_EEPROM_READ
0x24
[7:0]
EEPROM Address [7:0]
[15:8]
EEPROM Address [15:8]
Reading the Device Temperature
GET_TEMPERATURE (0x17)
-
Data returned by this register needs to be processed to correctly represent
data in temperature units of degrees Celsius. Data is returned in the first 14 bits [13:0]. Bit [13] is the
polarity bit indicating whether it is positive (0x0) or negative (0x1). For an ENDPOINT_IN transfer, data is
returned in 2 bytes with the MSB first. The temperature value represented in the raw data is contained in
the next 13 bits [12:0]. To obtain the temperature ADC code, the raw data should be masked (bitwise
AND’ed) with 0x1FFF, and the po
larity should be masked with 0x2000. The conversion from 12 bit ADC
code to an actual temperature reading in degrees Celsius is shown below:
Positive Temperature (bit 13 is 0)
= ADC code / 32
Negative Temperature (bit 13 is 1) = (ADC code
–
8192) / 32
It is not recommended to read the temperature too frequently, especially once the temperature of the
SC5312A has stabilized. The temperature sensor is a serial device located inside the RF module. Therefore,
like any other serial device, reading the temperature sensor requires a sending serial clock and data
commands from the processor. The process of sending clock pulses on the serial transfer line may cause
unwanted spurs on the RF signal as the serial clock could potentially modulate the externally-supplied LO
signal within the device.
Reading the Device Status
GET_DEVICE_STATUS (0x21)
- This register, summarized in Table 4, returns the device status information
such as phase lock status of the PLL, current reference settings, etc. Data is contained in the first three
bytes.