AN2039 - I²C Serial Commands

I²C Serial Command Format:

Notations:
S = Start
P = Stop
A = Acknowledge
N = N
W = Read/Write bit

Written Commands:
S<Slave Address> W A <Command> A <Parameter> A <ValueL> A <Value H> A P

Note: Some command will only contain a Parameter and no ValueL or ValueH parameter will be sent. Typically, these are Write commands which precede a Read command.

Read Commands:
S <Slave Sddress> R A <ValueL> A <ValueH> N P

Command 0x10: Program Flash

Writing a 0x10 followed by a 0xAB will start a Program Flash Operation. Once the user has updated all the parameters for all the Modules (using the GUI or I²C serial instructions mentioned in this section), a Program Flash operation will permanently burn the values into the Flash memory of the PIC16F1509 device. A subsequent reset or power-up reset will retrieve values from the Flash memory. This operation is recommended after the user updates all the module parameters.

Command 0x20: Set Module Start Time value

Writing a 0x20 Command followed by the Module number, will set a new start time for the specified Module. The two data bytes which follow this command and parameter will contain the desired Start time setting in mS. Since the Start time is only 14-bits, the value will be limited from 1 to 16393 mS.

Command 0x24: Read Module Start Time value

Writing a 0x24 Command followed by the Module number, will read the start time for the specified Module. A restart is then sent with a read cycle with the device slave address, to read the two data bytes. The two data bytes which follow this command and parameter will contain the desired Start time setting in mS. Since the Start time is only 14-bits, the value will be limited from 1 to 16393 mS.

Command 0x28: Set Module Stop Time value

Writing a 0x24 Command followed by the Module number, will set a new stop time for the specified Module. The two data bytes which follow this command and parameter will contain the desired Stop time setting in mS. Since the Stop time is only 14-bits, the value will be limited from 1 to 16393 mS.

Command 0x2C: Read Module Stop Time value

Writing a 0x2C Command followed by the Module number, will read the stop time for the specified Module. A restart is then sent with a read cycle with the device slave address, to read the two data bytes. The two data bytes which follow this command and parameter will contain the desired Stop time setting in mS. Since the Stop time is only 14-bits, the value will be limited from 1 to 16393 mS.

Command 0x30: Set DAC Margin Output Voltage

Writing a 0x30 Command followed by the module number as the Parameter, will send a new margin setting for the Parameter specified PWM/DAC channel. The two data bytes which follow this command and parameter will contain the desired PWM/DAC output setting. Since the PWM/DAC is only 8 bits, the ValueH is zero.

Command 0x38: Read DAC Margin Voltage

Writing a 0x38 Command followed by the module number will setup a read of the present DAC value. A restart is then sent with a read cycle with the device slave address, to read the two data bytes. A read will respond with the High and Low value for the DAC, however since the value is only 8 bit, the High value will be zero and the Low byte will contain the DAC value.

Command 0x34: Read System Retry Count

Writing a 0x34 Command followed by 0x00 as the Parameter, will read the preset retry count Parameter specified for the system . The two data bytes which follow this command and parameter will contain the retry counts. Since this value will typically be less than 10, the ValueH is ignored.

Command 0x3C: Set System Retry Count

Writing a 0x3C Command followed by 0x00 as the Parameter, will set the preset retry count Parameter specified for the system . The two data bytes which follow this command and parameter will contain the retry counts. Since this value will typically be less than 10, the ValueH is zero.

Command 0x40: Set Normal Under Voltage Limit

Writing a 0x40 followed by the module number as the Parameter, will send a new Normal Under Voltage Limit for that Channel. The two data bytes which follow this command and parameter will contain the desired Normal Under Voltage Limit for that ADC Channel and apply to that power supply. This is a 8-bit value so, ValueH is zero.

Command 0x50: Set Normal Over Voltage Limit

Writing a 0x50 followed by the module number as the Parameter, will send a new Normal Over Voltage Limit for that Channel. The two data bytes which follow this command and parameter will contain the desired Normal Over Voltage Limit for that ADC Channel and apply to that power supply. This is a 8-bit value so, ValueH is zero.

Command 0x60: Set Margin Under Voltage Limit

Writing a 0x60 followed by the module number as the Parameter, will send a new Margin Under Voltage Limit for that Channel. The two data bytes which follow this command and parameter will contain the desired Margin Under Voltage Limit for that ADC Channel and apply to that power supply. This is a 8-bit value so, ValueH is zero.

Command 0x70: Set Margin Over Voltage Limit

Writing a 0x70 followed by the module number as the Parameter, will send a new Margin Over Voltage Limit for that Channel. The two data bytes which follow this command and parameter will contain the desired Margin Over Voltage Limit for that ADC Channel and apply to that power supply. This is a 8-bit value so, ValueH is zero.

Command 0x80: Read Normal Under Voltage Limit

Writing a 0x80 followed by the module number as the parameter, will initiate a read for the Normal Under Voltage Limit for that ADC Channel. A restart is then sent with a read cycle with the device slave address, to read the two data bytes. The two data bytes which are read will contain the present Normal Under Voltage Limit for that module. Since the value is 8-bit only, the Low byte will contain the value and the High byte will be zero. The command will allow clock stretching from the Master for several mS.

Command 0x90: Read Normal Over Voltage Limit

Writing a 0x90 followed by the module number as the parameter, will initiate a read for the Normal Over Voltage Limit for that ADC Channel. A restart is then sent with a read cycle with the device slave address, to read the two data bytes. The two data bytes which are read will contain the present Normal Over Voltage Limit for that ADC Channel. Since the value is 8-bit only, the Low byte will contain the value and the High byte will be zero. The command will allow clock stretching from the Master for several mS.

Command 0xA0: Read Margin Under Voltage Limit

Writing a 0xA0 followed by the module number as the parameter, will initiate a read for the Margin Under Voltage Limit for that ADC Channel. A restart is then sent with a read cycle with the device slave address, to read the two data bytes. The two data bytes which are read will contain the present Margin Under Voltage Limit for that ADC Channel. Since the value is 8-bit only, the Low byte will contain the value and the High byte will be zero. The command will allow clock stretching from the Master for several mS.

Command 0xB0: Read Margin Over Voltage Limit

Writing a 0xB0 followed by the module number as the parameter, will initiate a read for the Margin Over Voltage Limit for that ADC Channel. A restart is then sent with a read cycle with the device slave address, to read the two data bytes. The two data bytes which are read will contain the present Margin Over Voltage Limit for that ADC Channel. Since the value is 8-bit only, the Low byte will contain the value and the High byte will be zero. The command will allow clock stretching from the Master for several mS.

Command 0xC0: Read Power Sequencer Status

Writing 0xC0 followed by the desired Status Register as the Parameter, will initiate a read of the desired Status Register. A restart is then sent with a read cycle with the device slave address to read the two data bytes of the status register. The status registers are as follows:
Register# Value
0 Power Supply Under Voltage error bits, one for each POL
1 Power Supply Over Voltage Error bits, one for each POL
2 Fuse,<3>, Sequencer State<2>, MarginEnable,1., ON/OFF ,0> bits
3 Number of System Sequence retries since the last power ADC channel
This command will allow clock stretch from the Master for several mS.

Command 0xC8 : Clear Status Error Flags as well as Retry Number

A 0xC8 followed by a 0xCE will send a clear command to clear all the status bits mentioned in the 0xC0 Command execution above. Status Registers 0 to 3 will all be cleared. Margin enable bit will not be cleared.

Command 0xD0: Read Module Analog Voltage

Writing a 0xD0 followed by the Module number as the parameter will initiate a read for the Module voltage reading. A restart is then sent with a read cycle the device slave address to read the two data bytes. The two data bytes which are read will contain the present Voltage from that Module Voltage. Since the value is 8-bit only, the Low byte will contain the value and the High byte will be zero. The command will allow clock stretching from the Master for several mS.

Command 0xE0: Power Up

Writing a 0xE0 followed by a 0xEF will start a Power-Up Sequence. If the Sequencer is already ON, then this command will be ignored. This command would typically be used to restart the Modules after a de-sequencing event which was triggered by an under/over voltage fault has occurred.

Command 0xF0: Power Down

Writing a 0xF0 followed by a 0xDF will start a power down sequence. This command is ignored if the controller is presently in the startup or power down state. If the controller is in the ON state then this command will initiate a power down sequence.

Command Summary:

chart1.png

Status Register Bit Definitions:

chart2.png

Modx = Module x
Mrg En = Margin Enable
OV = Over Voltage
UV = Under Voltage

20th Annual
Microchip MASTERs Conference 2016
Register now - Deadline: July 29

JW Marriott Desert Ridge Resort-Phoenix, AZ

© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.