Datasheet

MCP9843/98243
DS22153C-page 22 © 2009 Microchip Technology Inc.
FIGURE 5-3: Timing Diagram for Writing to the Configuration Register (See Section 4.0 “Serial
Communication”.
Writing to the CONFIG Register to Enable the Event Output pin <0000 0000 0000 1000>b.
SDA
A
C
K
0011
A
0000
A
C
K
S
2
A
1
A
0
12345678 12345678
SCL
0
Address Byte
W
MCP9843/98243
MCP9843/98243
MSB Data
A
C
K
A
C
K
P
12345678 12345678
LSB Data
Configuration Pointer
MCP9843/98243
MCP9843/98243
001
00000
000 00001
000
Note: this is an example routine:
i2c_start(); // send START command
i2c_write(AddressByte & 0xFE); //WRITE Command
//also, make sure bit 0 is cleared ‘0’
i2c_write(0x01); // Write CONFIG Register
i2c_write(0x00); // Write data
i2c_write(0x08); // Write data
i2c_stop(); // send STOP command