MCP9808
Writing to the CONFIG Register to Enable the Event Output Pin <0000 0000 0000 1000>b:
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
SCL
SDA
A
C
K
A
C
K
A
2
A
1
A
0
S
0
0
1
1
W
0
0
0
0
0
0
0
1
Address Byte
Configuration Pointer
MCP9808 MCP9808
1
0
2
3
0
4
0
5
0
6
0
7
0
8
0
1
0
2
0
3
0
4
0
5
1
6
0
7
0
8
0
A
C
K
A
C
K
0
P
MSB Data
LSB Data
MCP9808
MCP9808
Note: This is an example routine (see Appendix A: “Source Code”).
i2c_start();
// send START command
i2c_write(AddressByte & 0xFE);
//WRITE Command(see Section 4.1.4 “Address Byte”)
//also, make sure bit 0 is cleared ‘0’
// Write CONFIG Register
// Write data
i2c_write(0x01);
i2c_write(0x00);
i2c_write(0x08);
i2c_stop();
// Write data
// send STOP command
FIGURE 5-2:
Timing Diagram for Writing to the Configuration Register (see Section 4.0 “Serial
Communication”).
DS25095A-page 20
© 2011 Microchip Technology Inc.