如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
#include<Reg52.h>#include"image.h"#defineucharunsignedchar#defineuintunsignedintsbitcs=P3^2;sbitrd=P3^3;sbitwr=P3^4;sfrp1=0x90;unsignedcharbdatady;//延时100usvoiddelay(void){unsignedchari;for(i=0;i<3;i++){;}}/************************************************12Hz晶振************************************************/voiddelay_n8us(unsignedcharcount){unsignedi;for(i=0;i<count;i++){;}}voiddelay_ms(unsignedcharcount){unsignedchari;while(count--){//循环延时8usfor(i=0;i<125;i++){;}}}voiddelay_s(unsignedcharcount){while(count--){unsignedchari,j,k;for(i=0;i<10;i++){for(j=0;j<100;j++){for(k=0;k<125;k++){;}}}}}#include"HT1650.h"voidmain(){uinti,j,num;delay_s(1);delay_ms(1);delay_n8us(1);ht1650_command(0x01);//打开系统振荡器delay();ht1650_command(0x1a);//1/6biasdelay();ht1650_command(0x03);//开显示while(1){/*//==========清屏==================for(i=0;i<256;i++){ht1650_write(i,0,0x00);}for(i=0;i<256;i++){ht1650_write(i,1,0x00);}delay_s(2);*///==========全显==================for(i=0;i<256;i++){ht1650_write(i,0,0xff);}for(i=0;i<256;i++){ht1650_write(i,1,0xff);}delay_s(1);//==========框====================for(i=0;i<8;i++){ht1650_write(i,0,0xff);}for(j=0;j<31;j++){ht1650_write(8+8*j,0,0x01);for(i=(9+8*j);i<(15+8*j);i++){ht1650_write(i,0,0x00);}ht1650_write(15+8*j,0,0x08);}for(j=31;j<62;j++){ht1650_write(8+8*j,1,0x01);for(i=(9+8*j);i<(15+8*j);i++){ht1650_write(i,1,0x00);}ht1650_write(15+8*j,1,0x08);}for(i=504;i<512;i++){ht1650_write(i,1,0xff);}delay_s(1);//==========走横==================for(i=0;i<256;i++){ht1650_write(i,0,0x01);}for(i=0;i<256;i++){ht1650_write(i,1,0x01);}delay_ms(255);for(i=0;i<256;i++){ht1650_write(i,0,0x02);}for(i=0;i<256;i++){ht1650_write(i,1,0x02);}delay_ms(255);for(i=0;i<256;i++){ht1650_write(i,0,0x04);}for(i=0;i<256;i++