Microchip Technology TMPSNSRD-TCPL1 데이터 시트

다운로드
페이지 52
MCP9804
DS22203C-page 20
© 2009-2012 Microchip Technology Inc.
FIGURE 5-2:
Timing Diagram for Writing to the Configuration Register (see 
Writing to the CONFIG Register to Enable the Event Output Pin <0000 0000 0000 1000>b:
SDA
A
C
K
0
0
1
1
A
0
0
0
0
A
C
K
S
2
A
1
A
0
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
SCL
0
Address Byte
W
MCP9804
MCP9804
MSB Data
A
C
K
A
C
K
P
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
LSB Data
Configuration Pointer
MCP9804
MCP9804
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
Note: This is an example routine (see 
i2c_start();
// send START command
i2c_write(AddressByte & 0xFE);
//WRITE Command
 (see 
//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