void HL6024_Init(void) { uchar i; IIC_Start(); IIC_Wait(); TWDR = 0x7c; //硬件地址选择 IIC_Ack(); IIC_Wait();
TWDR = 0xE0; //器件选择 IIC_Ack(); IIC_Wait(); TWDR = 0xD8; //1/3偏压 4com IIC_Ack(); IIC_Wait(); TWDR = 0xf0; //闪烁控制 IIC_Ack(); IIC_Wait(); TWDR = 0x00; //装载数据指针 IIC_Ack(); IIC_Wait();
for(i=0;i<12;i++) { TWDR = 0xff; //装载数据指针 IIC_Ack(); IIC_Wait(); } IIC_Stop(); }
请问PCF8566T我这样初始化可以吗????
|