Datasheet

Table Of Contents
I
2
C™ Master Communications
© 2009 Microchip Technology Inc. DS51647C-page 35
FIGURE 4-9: I
2
C™ SCRIPT BUILDER – CREATING A SCRIPT
TABLE 4-2: I
2
C™ SCRIPT MACRO COMMAND
Macro Command
Command
Abbreviation
Description
I2CINIT [I_] I
2
C™ Initialization
I2TART [S_] I
2
C™ Start
I2TOP [P_] I
2
C™ Stop
I2CRESTART [RS] I
2
C™ Restart
I2CWRTBYT [W_] I
2
C™ Write Bytes. Next byte is the byte count,
followed by the data.
I2CRDBYT [R_] I
2
C™ Read Bytes. Next byte is the byte count.
I2CRDBLK [RB] I
2
C™ Read Block
I2CBITRATE [BR] Set I
2
C™ Bit Rate – min: 0 = 35k, max: 127 = 100k.
Next byte is the bit rate.
I2CRESET [RE] Reset MSSP module
I2CRDBYTNLB [RN] Read bytes – NACK last byte. Next byte is the byte
count.
I2CRDBLKNLB [RBN] Read block – NACK last byte
I2CAUX1RST [A1RST] Reset AUX1
I2CAUX1SET [A1RST] Set AUX1
I2CAUX1OUT [A1OUT] Set AUX1 direction to Output
I2CAUX1IN [A1IN] Set AUX1 direction to Input
I2CAUX1W0 [A1W0] AUX1 Wait 0
I2CAUX1W1 [A1W1] AUX1 Wait 1
I2CAUX2RST [A2RST] Reset AUX2
I2CAUX2SET [A2RST] Set AUX2
I2CAUX2OUT [A2OUT] Set AUX2 direction to Output
I2CAUX2IN [A2IN] Set AUX2 direction to Input
I2CAUX2W0 [A2W0] AUX2 Wait 0
I2CAUX2W1 [A2W1] AUX2 Wait 1