void Show_Waveform(void)
{
unsigned char k;
unsigned int i,s;
for(s=10;s<310;s++)
{
Set_ramaddr(cl[s-10],s);
Write_com_data(0x0022,0x0000);
if(cl[s-10]<cl[s-9])
{
Set_ramaddr(cl[s-10],s);
Write_com(0x0022);
set_LCM_RS;
LCM_DATA=0x00;
for(k=cl[s-10];k<cl[s-9];k++)
{
clr_LCM_WR;
set_LCM_WR;
clr_LCM_WR;
set_LCM_WR;
}
}
else if(cl[s-10]>cl[s-9])
{
Set_ramaddr(cl[s-9],s);
Write_com(0x0022);
set_LCM_RS;
LCM_DATA=0x00;
for(k=cl[s-10];k>cl[s-9];k--)
{
clr_LCM_WR;
set_LCM_WR;
clr_LCM_WR;
set_LCM_WR;
}
}
}
Scale();
for(s=10;s<310;s++)
{
cl[s-10]=RAM[s+sta-10];
Set_ramaddr(RAM[s+sta-10],s);
Write_com_data(0x0022,0x001f);
if(RAM[s+sta-10]<RAM[s+sta-9])
{
Set_ramaddr(RAM[s+sta-10],s);
Write_com(0x0022);
set_LCM_RS;
for(k=RAM[s+sta-10];k<RAM[s+sta-9];k++)
{
LCM_DATA=0x00;
clr_LCM_WR;
set_LCM_WR;
LCM_DATA=0x1f;
clr_LCM_WR;
set_LCM_WR;
}
}
else if(RAM[s+sta-10]>RAM[s+sta-9])
{
Set_ramaddr(RAM[s+sta-9],s);
Write_com(0x0022);
set_LCM_RS;
for(k=RAM[s+sta-10];k>RAM[s+sta-9];k--)
{
LCM_DATA=0x00;
clr_LCM_WR;
set_LCM_WR;
LCM_DATA=0x1f;
clr_LCM_WR;
set_LCM_WR;
}
}
}
}
此帖出自
小平头技术问答
一周热门 更多>