include “tm1650.h”
unsigned char CODE[20] = {0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F,0x77,0x7C,0x39,0x5E,0x79,0x71,0x73}; //0~9????
__asm void nop(void)
{
NOP
}
void Delay_us(u32 i) //us??
{
for(;i>0;i–)
{
__nop();
// nop();
// nop();
// nop();
// nop();
}
}
void I2CStart(void) //????
{
CLK_H;
DIO_H;
Delay_us(5);
DIO_L;
}
void I2Cask(void) //ACK??
{
u8 timeout = 1;
CLK_H;
Delay_us(5);
CLK_L;
//while((DIO)&&(timeout<=100))
{
timeout++;
}
Delay_us(5);
CLK_L;
}
void I2CStop(void) //????
{
CLK_H;
DIO_L;
Delay_us(5);
DIO_H;
}
void I2CWrByte(u8 oneByte) //?????????,????
{