You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
324 B
17 lines
324 B
#ifndef __I2C_H_ |
|
#define __I2C_H_ |
|
|
|
#include <reg51.h> |
|
|
|
sbit SCL=P1^1; |
|
sbit SDA=P1^0; |
|
|
|
void I2cStart(); |
|
void I2cStop(); |
|
unsigned char I2cSendByte(unsigned char dat); |
|
unsigned char I2cReadByte(); |
|
void At24c02Write(unsigned char addr,unsigned char dat); |
|
unsigned char At24c02Read(unsigned char addr); |
|
void Delay10us(); |
|
|
|
#endif
|
|
|