?? dot_7.c
字號:
#include<reg52.h>
unsigned char code table[]={
/*-- 文字: 不 --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=16x16 --*/
0x00,0x02,0x02,0x02,0x02,0x82,0x42,0xFE,0x06,0x42,0xC2,0x82,0x02,0x03,0x02,0x00,
0x00,0x08,0x04,0x02,0x01,0x00,0x00,0x7F,0x00,0x00,0x00,0x01,0x07,0x02,0x00,0x00,
/*-- 文字: 是 --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=16x16 --*/
0x80,0x80,0x80,0x80,0xBE,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xBE,0x80,0x80,0x80,0x00,
0x00,0x40,0x20,0x10,0x0E,0x10,0x20,0x3F,0x44,0x44,0x44,0x44,0x44,0x40,0x40,0x00,
/*-- 文字: 因 --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=16x16 --*/
0x00,0xFE,0x02,0x22,0x22,0x22,0xA2,0xFE,0x22,0x22,0x22,0x22,0x02,0xFE,0x00,0x00,
0x00,0xFF,0x40,0x50,0x48,0x46,0x43,0x40,0x41,0x42,0x5C,0x48,0x40,0xFF,0x00,0x00,
/*-- 文字: 為 --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=16x16 --*/
0x00,0x10,0x10,0x12,0x14,0x1C,0x10,0xF0,0x9F,0x10,0x10,0x10,0x10,0xF8,0x10,0x00,
0x00,0x00,0x40,0x20,0x10,0x08,0x06,0x01,0x00,0x11,0x26,0x40,0x20,0x1F,0x00,0x00,
/*-- 文字: 寂 --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=16x16 --*/
0x00,0x18,0x04,0x04,0xFC,0x24,0x24,0x25,0xC6,0x24,0x24,0x24,0xE4,0x0C,0x04,0x00,
0x20,0x11,0x4D,0x81,0x7F,0x05,0xB9,0x51,0x20,0x13,0x0C,0x12,0x21,0xC0,0x40,0x00,
/*-- 文字: 寞 --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=16x16 --*/
0x10,0x0C,0x14,0xD4,0x54,0x7C,0x55,0x56,0x54,0x7C,0x54,0xD4,0x14,0x0C,0x04,0x00,
0x00,0x90,0x90,0x57,0x55,0x35,0x35,0x1D,0x35,0x55,0x55,0x97,0x90,0x80,0x00,0x00,
/*-- 文字: 才 --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=16x16 --*/
0x00,0x10,0x10,0x10,0x10,0x10,0x10,0xD0,0x30,0xFF,0x10,0x10,0x10,0x10,0x10,0x00,
0x00,0x10,0x10,0x08,0x04,0x02,0x01,0x40,0x80,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,
/*-- 文字: 想 --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=16x16 --*/
0x08,0xC8,0x38,0xFF,0x18,0x68,0x08,0x00,0xFE,0x2A,0x2A,0x2A,0x2A,0xFE,0x00,0x00,
0x01,0x40,0x70,0x01,0x38,0x40,0x40,0x44,0x59,0x41,0x41,0x61,0x01,0x09,0x30,0x00,
/*-- 文字: 你 --*/
/*-- 宋體12; 此字體下對應的點陣為:寬x高=16x16 --*/
0x80,0x40,0xF0,0x2C,0x43,0x20,0x98,0x0F,0x0A,0xE8,0x08,0x88,0x28,0x1C,0x08,0x00,
0x00,0x00,0x7F,0x00,0x10,0x0C,0x03,0x21,0x40,0x3F,0x00,0x00,0x03,0x1C,0x08,0x00};
//延時500+0us 函數(shù)定義
void delay1(void)
{
unsigned char i, j;
for(i = 99; i > 0; i--)
for(j = 1; j > 0; j--);
}
void main(void)
{
unsigned char i, n;
unsigned int m;
// unsigned char col = 0x01;
unsigned int col = 0x0001;
while(1)
{
/*
//雙列同時掃描,雙倍速
P1 = ~col; //取反,掃描低電平有效
P0 = table[i+m]; //左邊半字上半部分
P2 = table[16+i+m]; //左邊半字下半部分
delay1(); //延時
P1 = 0xff; //關閉左邊半字掃描
P3 = ~col; //取反,掃描低電平有效
P0 = table[i+8+m]; //右邊半字上半部分
P2 = table[16+8+i+m]; //右邊半字下半部分
delay1(); //延時
P3 = 0xff;
col <<= 1;
i++; if(i == 8) {i = 0; col = 0x01;}
n++; if(n == 100) {n = 0; m++;}
*/
//單列掃描
/*
P0 = table[i+m];
P2 = table[16+i+m];
P1 = ~(col & 0xff);
P3 = ~(col >> 8);
delay1();delay1();delay1();
P1 = 0xff;
P3 = 0xff;
col <<= 1;
i++; if(i == 16) {i = 0; col = 0x0001;}
n++; if(n == 80) {n = 0; m++;}
if(m == 100) m = 0;
*/
P0 = table[i+m];
P2 = table[16+i+m];
P1 = ~(col & 0xff);
P3 = ~(col >> 8);
delay1();delay1();delay1();
P1 = 0xff;
P3 = 0xff;
col <<= 1;
i++; if(i == 16) {i = 0; col = 0x0001;}
n++; if(n == 80) {n = 0; m++;}
if(m == 100) m = 0;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -