资源描述:
《点阵16乘64红色左移》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、16*64点阵左移红色显示原理图:程序代码:#includesbitSHCP=P2^0;sbitDS=P2^1;sbitSTCP=P2^2;sbitRD0=P1^7;voiddatout(chardat);voidleft(charm);codechart[4][32]={{0x02,0x00,0x02,0x00,0x02,0x88,0x3F,0xD8,0x02,0x20,0x02,0x44,0xFF,0xFE,0x01,0x00,0x02,0x00,0x04,0x10,0x0C,0x3
2、0,0x14,0xC0,0x27,0x00,0x44,0x04,0x84,0x04,0x03,0xFC},{0x08,0x04,0x0B,0xFE,0x48,0x20,0x48,0x24,0x49,0xFE,0x49,0x24,0x49,0x24,0x49,0x24,0x49,0x24,0x49,0x24,0x49,0x24,0x49,0x24,0x11,0x34,0x11,0x28,0x20,0x20,0x40,0x20},{0x02,0x00,0x01,0x10,0x3F,0xF8,0x08,0x20
3、,0x04,0x20,0x04,0x44,0xFF,0xFE,0x01,0x00,0x01,0x00,0x01,0x08,0x7F,0xFC,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00},{0x08,0x20,0x08,0x28,0x7F,0xFC,0x08,0x20,0x09,0x20,0x01,0x04,0xFF,0xFE,0x01,0x00,0x01,0x10,0x1F,0xF8,0x10,0x10,0x10,0x10,0x10,0x10,0x
4、10,0x10,0x1F,0xF0,0x10,0x10}/*{0x00,0x00,0x7F,0xF8,0x00,0x10,0x00,0x20,0x00,0x40,0x01,0x80,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00}*/};voidmain(){inti,k,j;while(1){for(j=0;j<64;j++){for(k=0;k<60;
5、k++){for(i=0;i<16;i++){datout(t[0][i*2]);datout(t[0][i*2+1]);datout(t[1][i*2]);datout(t[1][i*2+1]);datout(t[2][i*2]);datout(t[2][i*2+1]);datout(t[3][i*2]);datout(t[3][i*2+1]);/*datout(t[4][i*2]);datout(t[4][i*2+1]);*/left(j);RD0=1;STCP=0;STCP=1;P3=i;RD0=0
6、;}}}}}voiddatout(chardat){chari;for(i=0;i<8;i++){if(((dat<