求高手讲解一下这一小部分音频显示程序
时间:10-02
整理:3721RD
点击:
oid LED_Display() interrupt 3 //刷屏中断
{
TH1=0xF3;
TL1=0X00;
if(MODEL==64) //模式64
{
for (G=0;G<64;G++) //红色柱状,装一行数据
{
if(LED_TAB[G]<=LINE+16)SDA_R_TOP=1;
else SDA_R_TOP=0;
if(LED_TAB[G]<=LINE)SDA_R=1;
else SDA_R=0;
if(LED_TAB1[G]==LINE){SDA_G_TOP=1;SDA_G=0;}
else if(LED_TAB1[G]==(LINE+16)){SDA_G_TOP=0;SDA_G=1;}
else SDA_G=SDA_G_TOP=1;
SHCP=1;SHCP=0; //脉冲
}
STCP=1;STCP=0; //锁存输出
P2=15-LINE; //行选
if(LINE>0)LINE--;
else LINE=15;
{
TH1=0xF3;
TL1=0X00;
if(MODEL==64) //模式64
{
for (G=0;G<64;G++) //红色柱状,装一行数据
{
if(LED_TAB[G]<=LINE+16)SDA_R_TOP=1;
else SDA_R_TOP=0;
if(LED_TAB[G]<=LINE)SDA_R=1;
else SDA_R=0;
if(LED_TAB1[G]==LINE){SDA_G_TOP=1;SDA_G=0;}
else if(LED_TAB1[G]==(LINE+16)){SDA_G_TOP=0;SDA_G=1;}
else SDA_G=SDA_G_TOP=1;
SHCP=1;SHCP=0; //脉冲
}
STCP=1;STCP=0; //锁存输出
P2=15-LINE; //行选
if(LINE>0)LINE--;
else LINE=15;