91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡(jiǎn)介

8字流動(dòng)顯示點(diǎn)陣Protues仿真圖 效果不錯(cuò)!

資源截圖

代碼片段和文件信息

/*****************************************************
???????16*128?LED點(diǎn)陣屏?C?程序
******************************************************
聲明:
?????本程序供大家學(xué)習(xí)之用,用勿用于商業(yè)用途。尊重版權(quán)。
?
?編寫:鄧椿薪
?時(shí)間:2006年1月20日?晚
?郵箱:love2151@xinhuanet.com
*******************************************************

//595連級(jí)輸出數(shù)據(jù),138行驅(qū)動(dòng)。P0_1為移動(dòng)速度高速/*點(diǎn)陣顯示漢字程串口輸出字符數(shù)據(jù),
//P2口輸出行掃描信號(hào)P2_7輸出595鎖存信號(hào)。*/


#include?
#define?uchar?unsigned?char
#define?uint?unsigned?int
uchar?yidh; ???//YID為移動(dòng)計(jì)數(shù)器,H為行段計(jì)數(shù)器。
uint?zimuo; ???????????//字模計(jì)數(shù)器
uchar?code?hanzi[]; ???//漢字字模
uchar?BUFF[18]; ???//緩存
void?in_data(void); //調(diào)整數(shù)據(jù)
void?rxd_data(void); //發(fā)送數(shù)據(jù)
void?sbuf_out(); ????//16段掃描
unsigned??code?sw[16]={0x000x010x020x030x040x050x060x070x080x090x0a0x0b0x0c0x0d0x0e0x0f};?/*16行段碼*/

//{0x600x620x640x660x680x6a0x6c0x6e
???????????????????//0x700x720x740x760x780x7a0x7c0x7e};?/*16行段碼*/

/********************************************/
void?main(void)
{
?uchar?id=10;
?yid=0;
?zimuo=0; ???
?while(1)
??{
while(yid<16) ???????//數(shù)據(jù)移位。
{
for(i=0;i ?{
?sbuf_out();
?????????}
yid++; //移動(dòng)一步
}
???yid=0;
???zimuo=zimuo+32; ????//后移一個(gè)字,
???if(zimuo>=3386) //總數(shù)減7個(gè)字。
???zimuo=0;
??}

?
}
/********************************/
void?sbuf_out()
??{
for(h=0;h<16;h++) ??//16行掃描
{
in_data(); ??//調(diào)整數(shù)據(jù)
rxd_data(); ??//串口發(fā)送數(shù)據(jù)
?????????P1=0x7f; ?????????????????//關(guān)閉顯示。
?????????P1_7=1; ??//鎖存為高,595鎖存信號(hào)
P1=sw[h]; ?????//送段碼

????????

}
}

/******************************************************/
void?in_data(void)
{
?char?s;
for(s=8;s>=0;s--) //h為向后先擇字節(jié)計(jì)數(shù)器,zimuoo為向后先字計(jì)數(shù)器
{
?BUFF[2*s+1]=hanzi[zimuo+32*s+2*h]; ?//把第一個(gè)字模的第一個(gè)字節(jié)放入BUFF0中第二個(gè)字模和第一個(gè)字節(jié)放入BUFF2中
?BUFF[2*s]=hanzi[zimuo+1+32*s+2*h]; ????//?把第一個(gè)字模的第二個(gè)字節(jié)放入BUFF1中第二個(gè)字模的第二個(gè)字節(jié)放入BUFF3中
}
}

/*******************************************************/
void?rxd_data(void) ????????????//串行發(fā)送數(shù)據(jù)
{
??char?s;
??uchar?inctempyidtemp;
??if(yid<8)
????inc=0;
??else?
????inc=1;
??for(s=0+inc;s<16+inc;s++) ???//發(fā)送8字節(jié)數(shù)據(jù)
{
??if(yid<8)?
?????tempyid=yid;
??????else?
????tempyid=yid-8;
????temp=(BUFF[s]>>tempyid)|(BUFF[s+1]<<(8-tempyid)); //h1左移tempyid位后和h2右移8-tempyid相或,取出移位后的數(shù)據(jù)。
????//temp=255-temp;


?SBUF=temp;//把BUFF中的字節(jié)從大到小移位相或后發(fā)送輸出。
?while(!TI);TI=0; ?//等待發(fā)送中斷
}
}
/*******************************************************/
uchar?code?hanzi[]=
{
0x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x00 ?
0x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x00
0x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x00
0x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x00
0x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x00 ?
0x000x000x000x000x000x000x000x000x000x000x000x000x000x000x000x00
0x0

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2010-07-31?07:46??ourdev_354010\
?????目錄???????????0??2010-08-04?11:20??ourdev_354010\8字文字流動(dòng)顯示\
?????文件??????260108??2010-02-26?18:41??ourdev_354010\8字文字流動(dòng)顯示\8字流動(dòng)顯示.DSN
?????文件????????1364??2010-07-31?08:06??ourdev_354010\8字文字流動(dòng)顯示\8字流動(dòng)顯示.PWI
?????文件?????????336??2010-04-09?17:37??ourdev_354010\8字文字流動(dòng)顯示\8字流動(dòng)顯示.SDF
?????文件??????260108??2008-07-18?08:26??ourdev_354010\8字文字流動(dòng)顯示\Last?Loaded?8字流動(dòng)顯示.DBK
?????文件??????121900??2010-08-03?13:07??ourdev_354010\8字文字流動(dòng)顯示\QQ截圖未命名.png
?????文件???????30390??2010-07-31?07:56??ourdev_354010\8字文字流動(dòng)顯示\zsp.c
?????文件???????11563??2008-07-16?13:09??ourdev_354010\8字文字流動(dòng)顯示\zsp.hex

評(píng)論

共有 條評(píng)論

相關(guān)資源