unsigned char TM1638_Read(void) //读数据函数
{
u8 i;
u8 temp=0;
for(i=0;i<8;i++)
{
temp>>=1;
TM1638_CLK_Low();
GPIO_ReadInputDataBit(GPIOD,GPIO_Pin_14); //空读一下只是为了延时clk低电平时间
TM1638_CLK_High();
if(GPIO_ReadInputDataBit(GPIOD,GPIO_Pin_14)==Bit_SET)
temp|=0x80;
}
return temp;
}

相关文章:

  • 2021-08-01
  • 2021-08-07
  • 2021-12-26
  • 2021-07-02
  • 2021-10-02
  • 2022-01-21
  • 2021-11-12
猜你喜欢
  • 2021-06-29
  • 2021-09-27
  • 2021-09-11
  • 2021-12-02
  • 2021-12-08
  • 2022-12-23
  • 2021-10-06
相关资源
相似解决方案