Datasheet

2014 Microchip Technology Inc. DS20005292A-page 49
MCP2221
3.1.13 SET SRAM SETTINGS
This command is used to alter various runtime chip-
settings. The altered settings reside in SRAM memory
and they won’t affect the chip’s Power-up/Reset default
settings. These altered settings will be active till the
next chip Power-up/Reset.
TABLE 3-36: COMMAND STRUCTURE
Byte
Index
Function Description Value Effect
0 0x60 Set SRAM settings – command code
1Dont
care
2 Clock Output Divider value – this allows the user to modify the clock output value on the fly, at run-time
Bit 7: Enable loading of a
new clock divider
1 The 4-0 bits will be loaded into the clock divider
0 Clock divider value won’t be altered
Bit 6-5 Don’t
care
Bit 4-3: Duty cycle 11 0% duty cycle
10 25% duty cycle
01 50% duty cycle
00 75% duty cycle
Bit 2-0: Clock divider
value
3 DAC Voltage Reference – this allows the user to modify the DAC reference voltage
Bit 7: Enable loading of a
new DAC reference
1 Bits 2-0 will be used for DAC reference voltage selection
0 DAC reference will remain unaltered
Bit 6-3 Don’t
care
Bit 2-1: DAC V
RM voltage
selection. These bits are
used to change the DAC
V
RM voltage
11 V
RM voltage is 4.096V (only if VDD is higher than this value)
10 VRM voltage is 2.048V
01 VRM voltage is 1.024V
00 V
RM voltage is off
Bit 0: This bit is used to
change the DAC refer-
ence voltage
1 DAC voltage reference is the internal DAC voltage reference module
(DAC V
RM)
0 DAC voltage reference is V
DD
4 Set DAC output value
Bit 7: Enable loading of a
new DAC value
1 Bits 4-0 will be used for ADC reference voltage selection
0 The current DAC value will remain unaltered
Bit 6-5 Don’t
care
Bit 4-0: The new DAC
value