跪求 单片机AT89c51用CH451芯片控制数码管程序,无需用键盘 只驱动数码管的最简单的c语言程序 。

2020-06-16 教育 61阅读
这是驱动数码管的程序,调用就行了
/**************************************************************************/
void write_451(unsigned char add,unsigned char x)
{
DIN_451=0;DIN_451=1;
B=x;
DIN_451=B0;DCLK_451=0;DCLK_451=1;
DIN_451=B1;DCLK_451=0;DCLK_451=1;
DIN_451=B2;DCLK_451=0;DCLK_451=1;
DIN_451=B3;DCLK_451=0;DCLK_451=1;
DIN_451=B4;DCLK_451=0;DCLK_451=1;
DIN_451=B5;DCLK_451=0;DCLK_451=1;
DIN_451=B6;DCLK_451=0;DCLK_451=1;
DIN_451=B7;DCLK_451=0;DCLK_451=1;
B=add;
DIN_451=B0;DCLK_451=0;DCLK_451=1;
DIN_451=B1;DCLK_451=0;DCLK_451=1;
DIN_451=B2;DCLK_451=0;DCLK_451=1;
DIN_451=B3;DCLK_451=0;DCLK_451=1;
LOAD_451=0;LOAD_451=1;
}
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com