虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

0x07

  • #include "at89x51.h" unsigned char code ddisp[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}

    #include "at89x51.h" unsigned char code ddisp[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f} //段显0123456789,P0口

    标签: unsigned include ddisp char

    上传时间: 2013-12-03

    上传用户:zm7516678

  • 03.彩色显示调用、清屏调用以及ASCII 0x07蜂鸣实验

    03.彩色显示调用、清屏调用以及ASCII 0x07蜂鸣实验

    标签: ASCII 0x07 03 彩色显示

    上传时间: 2016-04-05

    上传用户:15071087253

  • TLC2543 中文资料

    TLC2543是TI公司的12位串行模数转换器,使用开关电容逐次逼近技术完成A/D转换过程。由于是串行输入结构,能够节省51系列单片机I/O资源;且价格适中,分辨率较高,因此在仪器仪表中有较为广泛的应用。 TLC2543的特点 (1)12位分辩率A/D转换器; (2)在工作温度范围内10μs转换时间; (3)11个模拟输入通道; (4)3路内置自测试方式; (5)采样率为66kbps; (6)线性误差±1LSBmax; (7)有转换结束输出EOC; (8)具有单、双极性输出; (9)可编程的MSB或LSB前导; (10)可编程输出数据长度。 TLC2543的引脚排列及说明    TLC2543有两种封装形式:DB、DW或N封装以及FN封装,这两种封装的引脚排列如图1,引脚说明见表1 TLC2543电路图和程序欣赏 #include<reg52.h> #include<intrins.h> #define uchar unsigned char #define uint unsigned int sbit clock=P1^0; sbit d_in=P1^1; sbit d_out=P1^2; sbit _cs=P1^3; uchar a1,b1,c1,d1; float sum,sum1; double  sum_final1; double  sum_final; uchar duan[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; uchar wei[]={0xf7,0xfb,0xfd,0xfe};  void delay(unsigned char b)   //50us {           unsigned char a;           for(;b>0;b--)                     for(a=22;a>0;a--); }  void display(uchar a,uchar b,uchar c,uchar d) {    P0=duan[a]|0x80;    P2=wei[0];    delay(5);    P2=0xff;    P0=duan[b];    P2=wei[1];    delay(5);   P2=0xff;   P0=duan[c];   P2=wei[2];   delay(5);   P2=0xff;   P0=duan[d];   P2=wei[3];   delay(5);   P2=0xff;   } uint read(uchar port) {   uchar  i,al=0,ah=0;   unsigned long ad;   clock=0;   _cs=0;   port<<=4;   for(i=0;i<4;i++)  {    d_in=port&0x80;    clock=1;    clock=0;    port<<=1;  }   d_in=0;   for(i=0;i<8;i++)  {    clock=1;    clock=0;  }   _cs=1;   delay(5);   _cs=0;   for(i=0;i<4;i++)  {    clock=1;    ah<<=1;    if(d_out)ah|=0x01;    clock=0; }   for(i=0;i<8;i++)  {    clock=1;    al<<=1;    if(d_out) al|=0x01;    clock=0;  }   _cs=1;   ad=(uint)ah;   ad<<=8;   ad|=al;   return(ad); }  void main()  {   uchar j;   sum=0;sum1=0;   sum_final=0;   sum_final1=0;    while(1)  {              for(j=0;j<128;j++)          {             sum1+=read(1);             display(a1,b1,c1,d1);           }            sum=sum1/128;            sum1=0;            sum_final1=(sum/4095)*5;            sum_final=sum_final1*1000;            a1=(int)sum_final/1000;            b1=(int)sum_final%1000/100;            c1=(int)sum_final%1000%100/10;            d1=(int)sum_final%10;            display(a1,b1,c1,d1);           }         } 

    标签: 2543 TLC

    上传时间: 2013-11-19

    上传用户:shen1230

  • 数字钟显示电路

    SHUZIZHONG显示电路 源程序如下: #include <reg51.h>#include <intrins.h> unsigned char data dis_digit; unsigned char code dis_code[]={ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};unsigned char data dis_buf[16];unsigned char data dis_index;char hour,min,sec,wang,year,mouth,day;unsigned char sec100;

    标签: 数字 显示电路

    上传时间: 2013-11-24

    上传用户:fdmpy

  • DS1302+AT89S52+LED时钟程序(C语言源代码+

    #include<reg51.h>/*************************ds1302与at89s52引脚连接********************/sbit T_RST=P3^5; sbit T_CLK=P3^6;                 sbit T_IO=P3^7;                                sbit ACC0=ACC^0;sbit ACC7=ACC^7;unsigned char seg[]={0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09};         //0~~9段码 /******************DS1302:写入操作(上升沿)*********************/ void write_byte(unsigned char da){   unsigned char i;   ACC=da;   for(i=8;i>0;i--)   {       T_IO=ACC0;   T_CLK=0;           T_CLK=1;      ACC=ACC>>1;   }} /******************DS1302:读取操作(下降沿)*****************/unsigned char read_byte(void){   unsigned char i;   for(i=0;i<8;i++)   {      ACC=ACC>>1;   T_CLK = 1;   T_CLK = 0;      ACC7 = T_IO;   }   return(ACC); } /******************DS1302:写入数据(先送地址,再写数据)***************************/ void write_1302(unsigned char addr,unsigned char da){   T_RST=0;    //停止工作   T_CLK=0;                                    T_RST=1;   //重新工作   write_byte(addr);    //写入地址      write_byte(da);   T_RST=0;   T_CLK=1;}

    标签: 1302 LED DS AT

    上传时间: 2014-01-17

    上传用户:sglccwk

  • c8051f020 实时时钟模块程序 内含IIC模块程序/********************** SYSTEM CLOCK 8M********************************/

    c8051f020 实时时钟模块程序 内含IIC模块程序/********************** SYSTEM CLOCK 8M********************************/ extern unsigned char xdata currenttime[16]={0} extern unsigned char xdata settime[16]={ 0x00, // control regesiter 1 0x00, // control regesiter 2 0x01, //current second 0x19, //current minute 0x20, //current hour 0x29, //current data 0x04, //current week 0x07, //current month 0x05, //current year 0x00, // alarm value reset 0x00, // alarm value reset 0x00, // alarm value reset 0x00, // alarm value reset 0x00, // clk out disable 0x00, // close timer 0x00, } /*********************************************************************/ extern void Current_Time ( void ) extern void Set_Time ( void )

    标签: c8051f020 SYSTEM CLOCK IIC

    上传时间: 2015-06-30

    上传用户:edisonfather

  • 用定时器以间隔500MS在6位数码管上依次显示0、1、 2、3….C、D、E、F,重复。

    #include<reg51.h> #define uchar unsigned char #define uint unsigned int uint i,j; sbit dula=P2^6; sbit wela=P2^7; uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d, 0x7d,0x07,0x7f,0x6f,0x77,0x7c, 0x39,0x5e,0x79,0x71}; void main() {  j=0; i=0;     TMOD=0X01; TH0=(65536-50000)/256; TL0=(65536-50000)%6; EA=1; ET0=1; TR0=1; while(1); } void time0() interrupt 1 { TH0=(65536-50000)/256; TL0=(65536-50000)%6;     i++; if(i==15) { P0=table[j]; dula=1; dula=0; P0=0XC0; wela=1; wela=0; j++; i=0; if(j==16) { j=0; } } }

    标签: 用定时器以间隔500MS在6位数码管上依次显示0、1、 2、3….C、D、E、F,重复。

    上传时间: 2016-02-11

    上传用户:娇纵Pamper

  • 红外解码程序

    /*  * _168ZHONGDUAN2.c  *  * Created: 2014/11/2 15:12:45  *  Author: lenovo  */  #include <avr/io.h> #include <avr/iom168pa.h> #include <avr/interrupt.h> #include <util/delay.h> #include <avr/eeprom.h> //#include <util/delay_basic.h> //unsigned char const SEGtable[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x40}; #define BIT(x) (1<<(x)) #include<avr/signal.h>       #include<avr/pgmspace.h>  #include<util/delay.h>  #include<avr/eeprom.h> #define setb(val,bitn) (val|=(1<<(bitn)))//设置某IO口某位为1 #define clr(val,bitn) (val&=~(1<<(bitn)))//设置某IO口某位为0 #define get(val,bitn) (val&(1<<(bitn)))//读取某位状态 //uchar ACT[8] ={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f}; #define CPL_BIT(x,y) (x^=(1<<y)) #define CLR_BIT(x,y) (x&=~(1<<y)) #define  SET_1(a,b) a|=(1<<b)   #define  CLE_0(a,b) a&=~(1<<b)    /*------宏定义------*/  #include <avr/wdt.h> #include <avr/sleep.h>    #include <avr/interrupt.h> #include <avr/pgmspace.h> #include <util/delay.h> #include <avr/eeprom.h> #define setb(val,bitn) (val|=(1<<(bitn)))//设置某IO口某位为1 #define clr(val,bitn) (val&=~(1<<(bitn)))//设置某IO口某位为0 #define get(val,bitn) (val&(1<<(bitn)))//读取某位状态  #define uint8  unsigned char  #define uint16 unsigned int  #define   P_LCDCS1 setb(PORTB,5)  #define  P_LCDCS0 clr(PORTB,5)  #define   P_LCDRST1 setb(PORTB,1)  #define   P_LCDRST0 clr(PORTB,1)  #define  P_LCDRS1 setb(PORTB,2)  #define   P_LCDRS0 clr(PORTB,2)  #define  P_LCDDAT1 setb(PORTB,4)  #define   P_LCDDAT0 clr(PORTB,4)  #define P_LCDCLK1 setb(PORTB,3)  #define   P_LCDCLK0 clr(PORTB,3) //#define     LCD_ //-----页地址定义----- #define     Page1       0 #define     Page2       1 #define     Page3       2 #define     Page4       3 #define     Page5       4 #define     Page6       5 #define     Page7       6 #define     Page8       7 //-----列地址定义-----每8列地址增1 #define     List8_1        0 #define     List8_2        7 #define     List8_3        15 #define     List8_4        23 #define     List8_5        31 #define     List8_6        39 #define     List8_7        47 #define     List8_8        55 #define     List8_9        63 #define     List8_10       71 #define     List8_11       79 #define     List8_12       87 #define     List8_13       95 #define     List8_14       103 #define     List8_15       111 #define     List8_16       119 //#define     List8_17       127 //-----列地址定义-----每16列地址增1 #define     List16_1        0 #define     List16_2        15 #define     List16_3        31 #define     List16_4        47 #define     List16_5        63 #define     List16_6        79 #define     List16_7        95 #define     List16_8        111 //---------------------------------- #define     STR_CHARG       "Charge"    //提示充电 #define     STR_PRCE        "%"         //电量百分比 #define     STR_ERR         "Err" //出错显示 #define     STR_OFF         "OFF"  //关机显示 //待机显示 #define     STR_WAIT1         "Portable UPS"  #define     STR_WAIT2         "110V/60HZ"  #define     STR_WAIT3         "Select:DC OR AC"  #define     STR_WAIT4         "BATTERY:"  //开机显示 #define     STR_OUTSTATUS      "Out Status:"  #define     STR_DCOUT12V         "DC12V"  #define     STR_DCOUT5V         "DC5V"  #define     STR_ACOUT         "AC110V" //#define     STR_MAOHAO         ":"   //====================================== extern uint8  LOCKA[2][16] ; //extern uint8 code BATS[10][16] ; extern uint8  BAT2S[12][32] ; extern uint8  NC[] ; extern uint8  mao_hao[] ; extern uint8  num1[] ; extern uint8  num2[] ; extern uint8 num3[] ; extern uint8  num4[] ; extern uint8  num5[] ; extern uint8 num6[] ; extern uint8  num7[] ; extern uint8  num8[] ; extern uint8  num9[] ; extern uint8  Tab_Ascii_8x16[95][16] ; extern uint8  Tab_Ascii_5x7[95][5] ; extern uint8  zhuang1[] ; extern uint8  tai1[] ; extern uint8  shi1[] ; extern uint8  yong1[] ; //---------------------------------- //extern void LcdWriteCommand(uint8 data1) ; extern void Display_Graphic_32x32(uint8 page,uint8 column,uint8 *dp) ; extern void Display_Graphic_32x16(uint8 page,uint8 column,uint8 *dp) ; extern void Display_Graphic_16x16(uint8 page,uint8 column,uint8 *dp) ; extern void Display_Graphic_8x16(uint8 page,uint8 column,uint8 *dp) ; extern void Display_String_8x16(uint8 page,uint8 column,uint8 *text) ; extern void Display_Num_8x16(uint8 page,uint8 column,uint8 Num) ; extern void Display_Digital_8x16(uint8 page,uint8 column,uint8 *a) ; extern void Display_Nop_8x16(uint8 page,uint8 column,uint8 DatLong) ; extern void Display_String_5x7(uint8 page,uint8 column,uint8 *text) ; extern void Full_Display(void) ; extern void Clear_Screen(void) ; extern void Init_lcd12864(void) ; //#endif   //========c12864.c============================================== /*************************************************** LCD:晶联讯电子 JLX12864G-086-PN(不带字库IC-UC1701X) 仅支持串行驱动方式 ***************************************************/ //#include "global.h"  //#include "c12864.h"   #define     Tab_Ascii_8x16_CALL1  //粗体字形 #define     Tab_Ascii_8x16_CALL2  //细体字形 #define     Tab_Ascii_5x7_CALL #define     Display_Graphic_32x32_CALL #define     Display_Graphic_32x16_CALL #define     Display_Graphic_16x16_CALL #define     Display_Graphic_8x16_CALL #define     Display_String_8x16_CALL     //显示字符串 #define     Display_Num_8x16_CALL        //显示单个数据0-9 #define     Display_Digital_8x16_CALL    //显示数据0-9999 #define     Display_Nop_8x16_CALL        //填充8*16的空字符N个 #define     Display_String_5x7_CALL #define     Full_Display_CALL   //==============================================================================  uint8 aa[]={0,1,2,3,4,5,6,7,8,9};   uint8 LOCKA[2][16]={ //--   童锁符号  -- //--    此字体下对应的点阵为:宽x高=16x16   -- //0x00, 0x00, 0xc0, 0xe0, 0xf0, 0xd8, 0xcc, 0xc4, 0xc4, 0xcc, 0xd8, 0xf0, 0xe0, 0xc0, 0x00, 0x00, //0x00, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xb0, 0x98, 0x8c, 0x8c, 0x8c, 0x8c, 0x98, 0xb0, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x00, } ; const PROGMEM uint8_t  BATS[10][16]={ //--   电池符号  -- //--    此字体下对应的点阵为:宽x高=16x16   -- 0x00, 0x00, 0x00, 0xf8, 0x08, 0x08, 0x0c, 0x0e, 0x0e, 0x0c, 0x08, 0x08, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x08, 0x08, 0x0c, 0x0e, 0x0e, 0x0c, 0x08, 0x08, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x08, 0x08, 0x0c, 0x0e, 0x0e, 0x0c, 0x08, 0x08, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xc8, 0xc8, 0xcc, 0xce, 0xce, 0xcc, 0xc8, 0xc8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0xf8, 0xfc, 0xfe, 0xfe, 0xfc, 0xf8, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x00, 0x00, 0x00, }; const PROGMEM uint8_t  BAT2S1[12][32]={ /*--   电池符号  --*/ /*--    此字体下对应的点阵为:宽x高=32x16   --*/ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xf8, 0xc0, 0x80}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3f, 0x07, 0x03}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x08, 0x08, 0xe8, 0xe8, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xf8, 0xc0, 0x80}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3f, 0x07, 0x03}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x08, 0x08, 0xe8, 0xe8, 0x08, 0x08, 0xe8, 0xe8, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xf8, 0xc0, 0x80}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3f, 0x07, 0x03}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x08, 0x08, 0xe8, 0xe8, 0x08, 0x08, 0xe8, 0xe8, 0x08, 0x08, 0xe8, 0xe8, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xf8, 0xc0, 0x80}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3f, 0x07, 0x03}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x08, 0x08, 0xe8, 0xe8, 0x08, 0x08, 0xe8, 0xe8, 0x08, 0x08, 0xe8, 0xe8, 0x08, 0x08, 0xe8, 0xe8, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xf8, 0xc0, 0x80}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3f, 0x07, 0x03}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x08, 0x08, 0xe8, 0xe8, 0x08, 0x08, 0xe8, 0xe8, 0x08, 0x08, 0xe8, 0xe8, 0x08, 0x08, 0xe8, 0xe8, 0x08, 0x08, 0xe8, 0xe8, 0x08, 0x08, 0xf8, 0xc0, 0x80}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x3f, 0x07, 0x03}, } ;   const PROGMEM uint8_t  BAT2S2[2][32]={ //--   电池符号 不显示 -- //--    此字体下对应的点阵为:宽x高=32x16   -- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, } ;  uint8 NC[]={ /*--  文字: 空符号  --*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, } ; uint8 mao_hao[]={ /*--  文字:  : (冒号) --*/ /*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00}; uint8  num0[]={ /*--  文字:  0  --*/ /*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00 }; uint8  num1[]={ /*--  文字:  1  --*/ /*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00 }; uint8  num2[]={ /*--  文字:  2  --*/ /*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00  //细体 //0x08,0x0C,0x84,0xC4,0x64,0x3C,0x18,0x00,0x0E,0x0F,0x09,0x08,0x08,0x0C,0x0C,0x00, // 粗体 }; uint8  num3[]={ /*--  文字:  3  --*/ /*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00 }; uint8  num4[]={ /*--  文字:  4  --*/ /*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00 }; uint8  num5[]={ /*--  文字:  5  --*/ /*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00 }; uint8  num6[]={ /*--  文字:  6  --*/ /*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00 }; uint8  num7[]={ /*--  文字:  7  --*/ /*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00 }; uint8  num8[]={ /*--  文字:  8  --*/ /*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00 }; uint8  num9[]={ /*--  文字:  9  --*/ /*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00 }; //=======8x16======================================================================= #ifdef  Display_String_8x16_CALL   //Tab_Ascii_8x16_CALL    const PROGMEM uint8_t Tab_Ascii_8x161[95][16]={  //粗体字形  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // - -  0x00,0x00,0x38,0xFC,0xFC,0x38,0x00,0x00,0x00,0x00,0x00,0x0D,0x0D,0x00,0x00,0x00, // -!-  0x00,0x0E,0x1E,0x00,0x00,0x1E,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // -"-  0x20,0xF8,0xF8,0x20,0xF8,0xF8,0x20,0x00,0x02,0x0F,0x0F,0x02,0x0F,0x0F,0x02,0x00, // -#-  0x38,0x7C,0x44,0x47,0x47,0xCC,0x98,0x00,0x03,0x06,0x04,0x1C,0x1C,0x07,0x03,0x00, // -$-  0x30,0x30,0x00,0x80,0xC0,0x60,0x30,0x00,0x0C,0x06,0x03,0x01,0x00,0x0C,0x0C,0x00, // -%-  0x80,0xD8,0x7C,0xE4,0xBC,0xD8,0x40,0x00,0x07,0x0F,0x08,0x08,0x07,0x0F,0x08,0x00, // -&-  0x00,0x10,0x1E,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // -'-  0x00,0x00,0xF0,0xF8,0x0C,0x04,0x00,0x00,0x00,0x00,0x03,0x07,0x0C,0x08,0x00,0x00, // -(-  0x00,0x00,0x04,0x0C,0xF8,0xF0,0x00,0x00,0x00,0x00,0x08,0x0C,0x07,0x03,0x00,0x00, // -)-  0x80,0xA0,0xE0,0xC0,0xC0,0xE0,0xA0,0x80,0x00,0x02,0x03,0x01,0x01,0x03,0x02,0x00, // -*-  0x00,0x80,0x80,0xE0,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x03,0x03,0x00,0x00,0x00, // -+-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x1E,0x0E,0x00,0x00,0x00, // -,-  0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ---  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x00,0x00,0x00, // -.-  0x00,0x00,0x00,0x80,0xC0,0x60,0x30,0x00,0x0C,0x06,0x03,0x01,0x00,0x00,0x00,0x00, // -/-  0xF8,0xFC,0x04,0xC4,0x24,0xFC,0xF8,0x00,0x07,0x0F,0x09,0x08,0x08,0x0F,0x07,0x00, // -0-  0x00,0x10,0x18,0xFC,0xFC,0x00,0x00,0x00,0x00,0x08,0x08,0x0F,0x0F,0x08,0x08,0x00, // -1-  0x08,0x0C,0x84,0xC4,0x64,0x3C,0x18,0x00,0x0E,0x0F,0x09,0x08,0x08,0x0C,0x0C,0x00, // -2-  0x08,0x0C,0x44,0x44,0x44,0xFC,0xB8,0x00,0x04,0x0C,0x08,0x08,0x08,0x0F,0x07,0x00, // -3-  0xC0,0xE0,0xB0,0x98,0xFC,0xFC,0x80,0x00,0x00,0x00,0x00,0x08,0x0F,0x0F,0x08,0x00, // -4-  0x7C,0x7C,0x44,0x44,0xC4,0xC4,0x84,0x00,0x04,0x0C,0x08,0x08,0x08,0x0F,0x07,0x00, // -5-  0xF0,0xF8,0x4C,0x44,0x44,0xC0,0x80,0x00,0x07,0x0F,0x08,0x08,0x08,0x0F,0x07,0x00, // -6-  0x0C,0x0C,0x04,0x84,0xC4,0x7C,0x3C,0x00,0x00,0x00,0x0F,0x0F,0x00,0x00,0x00,0x00, // -7-  0xB8,0xFC,0x44,0x44,0x44,0xFC,0xB8,0x00,0x07,0x0F,0x08,0x08,0x08,0x0F,0x07,0x00, // -8-  0x38,0x7C,0x44,0x44,0x44,0xFC,0xF8,0x00,0x00,0x08,0x08,0x08,0x0C,0x07,0x03,0x00, // -9-  0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x00,0x00,0x00, // -:-  0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,0x08,0x0E,0x06,0x00,0x00,0x00, // -;-  0x00,0x80,0xC0,0x60,0x30,0x18,0x08,0x00,0x00,0x00,0x01,0x03,0x06,0x0C,0x08,0x00, // -<-  0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00, // -=-  0x00,0x08,0x18,0x30,0x60,0xC0,0x80,0x00,0x00,0x08,0x0C,0x06,0x03,0x01,0x00,0x00, // ->-  0x18,0x1C,0x04,0xC4,0xE4,0x3C,0x18,0x00,0x00,0x00,0x00,0x0D,0x0D,0x00,0x00,0x00, // -?-  0xF0,0xF8,0x08,0xC8,0xC8,0xF8,0xF0,0x00,0x07,0x0F,0x08,0x0B,0x0B,0x0B,0x01,0x00, // -@-  0xE0,0xF0,0x98,0x8C,0x98,0xF0,0xE0,0x00,0x0F,0x0F,0x00,0x00,0x00,0x0F,0x0F,0x00, // -A-  0x04,0xFC,0xFC,0x44,0x44,0xFC,0xB8,0x00,0x08,0x0F,0x0F,0x08,0x08,0x0F,0x07,0x00, // -B-  0xF0,0xF8,0x0C,0x04,0x04,0x0C,0x18,0x00,0x03,0x07,0x0C,0x08,0x08,0x0C,0x06,0x00, // -C-  0x04,0xFC,0xFC,0x04,0x0C,0xF8,0xF0,0x00,0x08,0x0F,0x0F,0x08,0x0C,0x07,0x03,0x00, // -D-  0x04,0xFC,0xFC,0x44,0xE4,0x0C,0x1C,0x00,0x08,0x0F,0x0F,0x08,0x08,0x0C,0x0E,0x00, // -E-  0x04,0xFC,0xFC,0x44,0xE4,0x0C,0x1C,0x00,0x08,0x0F,0x0F,0x08,0x00,0x00,0x00,0x00, // -F-  0xF0,0xF8,0x0C,0x84,0x84,0x8C,0x98,0x00,0x03,0x07,0x0C,0x08,0x08,0x07,0x0F,0x00, // -G-  0xFC,0xFC,0x40,0x40,0x40,0xFC,0xFC,0x00,0x0F,0x0F,0x00,0x00,0x00,0x0F,0x0F,0x00, // -H-  0x00,0x00,0x04,0xFC,0xFC,0x04,0x00,0x00,0x00,0x00,0x08,0x0F,0x0F,0x08,0x00,0x00, // -I-  0x00,0x00,0x00,0x04,0xFC,0xFC,0x04,0x00,0x07,0x0F,0x08,0x08,0x0F,0x07,0x00,0x00, // -J-  0x04,0xFC,0xFC,0xC0,0xF0,0x3C,0x0C,0x00,0x08,0x0F,0x0F,0x00,0x01,0x0F,0x0E,0x00, // -K-  0x04,0xFC,0xFC,0x04,0x00,0x00,0x00,0x00,0x08,0x0F,0x0F,0x08,0x08,0x0C,0x0E,0x00, // -L-  0xFC,0xFC,0x38,0x70,0x38,0xFC,0xFC,0x00,0x0F,0x0F,0x00,0x00,0x00,0x0F,0x0F,0x00, // -M-  0xFC,0xFC,0x38,0x70,0xE0,0xFC,0xFC,0x00,0x0F,0x0F,0x00,0x00,0x00,0x0F,0x0F,0x00, // -N-  0xF0,0xF8,0x0C,0x04,0x0C,0xF8,0xF0,0x00,0x03,0x07,0x0C,0x08,0x0C,0x07,0x03,0x00, // -O-  0x04,0xFC,0xFC,0x44,0x44,0x7C,0x38,0x00,0x08,0x0F,0x0F,0x08,0x00,0x00,0x00,0x00, // -P-  0xF8,0xFC,0x04,0x04,0x04,0xFC,0xF8,0x00,0x07,0x0F,0x08,0x0E,0x3C,0x3F,0x27,0x00, // -Q-  0x04,0xFC,0xFC,0x44,0xC4,0xFC,0x38,0x00,0x08,0x0F,0x0F,0x00,0x00,0x0F,0x0F,0x00, // -R-  0x18,0x3C,0x64,0x44,0xC4,0x9C,0x18,0x00,0x06,0x0E,0x08,0x08,0x08,0x0F,0x07,0x00, // -S-  0x00,0x1C,0x0C,0xFC,0xFC,0x0C,0x1C,0x00,0x00,0x00,0x08,0x0F,0x0F,0x08,0x00,0x00, // -T-  0xFC,0xFC,0x00,0x00,0x00,0xFC,0xFC,0x00,0x07,0x0F,0x08,0x08,0x08,0x0F,0x07,0x00, // -U-  0xFC,0xFC,0x00,0x00,0x00,0xFC,0xFC,0x00,0x01,0x03,0x06,0x0C,0x06,0x03,0x01,0x00, // -V-  0xFC,0xFC,0x00,0x80,0x00,0xFC,0xFC,0x00,0x03,0x0F,0x0E,0x03,0x0E,0x0F,0x03,0x00, // -W-  0x0C,0x3C,0xF0,0xC0,0xF0,0x3C,0x0C,0x00,0x0C,0x0F,0x03,0x00,0x03,0x0F,0x0C,0x00, // -X-  0x00,0x3C,0x7C,0xC0,0xC0,0x7C,0x3C,0x00,0x00,0x00,0x08,0x0F,0x0F,0x08,0x00,0x00, // -Y-  0x1C,0x0C,0x84,0xC4,0x64,0x3C,0x1C,0x00,0x0E,0x0F,0x09,0x08,0x08,0x0C,0x0E,0x00, // -Z-  0x00,0x00,0xFC,0xFC,0x04,0x04,0x00,0x00,0x00,0x00,0x0F,0x0F,0x08,0x08,0x00,0x00, // -[-  0x38,0x70,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0E,0x00, // -\-  0x00,0x00,0x04,0x04,0xFC,0xFC,0x00,0x00,0x00,0x00,0x08,0x08,0x0F,0x0F,0x00,0x00, // -]-  0x08,0x0C,0x06,0x03,0x06,0x0C,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // -^-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20, // -_-  0x00,0x00,0x03,0x07,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // -`-  0x00,0xA0,0xA0,0xA0,0xE0,0xC0,0x00,0x00,0x07,0x0F,0x08,0x08,0x07,0x0F,0x08,0x00, // -a-  0x04,0xFC,0xFC,0x20,0x60,0xC0,0x80,0x00,0x08,0x0F,0x07,0x08,0x08,0x0F,0x07,0x00, // -b-  0xC0,0xE0,0x20,0x20,0x20,0x60,0x40,0x00,0x07,0x0F,0x08,0x08,0x08,0x0C,0x04,0x00, // -c-  0x80,0xC0,0x60,0x24,0xFC,0xFC,0x00,0x00,0x07,0x0F,0x08,0x08,0x07,0x0F,0x08,0x00, // -d-  0xC0,0xE0,0xA0,0xA0,0xA0,0xE0,0xC0,0x00,0x07,0x0F,0x08,0x08,0x08,0x0C,0x04,0x00, // -e-  0x40,0xF8,0xFC,0x44,0x0C,0x18,0x00,0x00,0x08,0x0F,0x0F,0x08,0x00,0x00,0x00,0x00, // -f-  0xC0,0xE0,0x20,0x20,0xC0,0xE0,0x20,0x00,0x27,0x6F,0x48,0x48,0x7F,0x3F,0x00,0x00, // -g-  0x04,0xFC,0xFC,0x40,0x20,0xE0,0xC0,0x00,0x08,0x0F,0x0F,0x00,0x00,0x0F,0x0F,0x00, // -h-  0x00,0x00,0x20,0xEC,0xEC,0x00,0x00,0x00,0x00,0x00,0x08,0x0F,0x0F,0x08,0x00,0x00, // -i-  0x00,0x00,0x00,0x00,0x20,0xEC,0xEC,0x00,0x00,0x30,0x70,0x40,0x40,0x7F,0x3F,0x00, // -j-  0x04,0xFC,0xFC,0x80,0xC0,0x60,0x20,0x00,0x08,0x0F,0x0F,0x01,0x03,0x0E,0x0C,0x00, // -k-  0x00,0x00,0x04,0xFC,0xFC,0x00,0x00,0x00,0x00,0x00,0x08,0x0F,0x0F,0x08,0x00,0x00, // -l-  0xE0,0xE0,0x60,0xC0,0x60,0xE0,0xC0,0x00,0x0F,0x0F,0x00,0x0F,0x00,0x0F,0x0F,0x00, // -m-  0x20,0xE0,0xC0,0x20,0x20,0xE0,0xC0,0x00,0x00,0x0F,0x0F,0x00,0x00,0x0F,0x0F,0x00, // -n-  0xC0,0xE0,0x20,0x20,0x20,0xE0,0xC0,0x00,0x07,0x0F,0x08,0x08,0x08,0x0F,0x07,0x00, // -o-  0x20,0xE0,0xC0,0x20,0x20,0xE0,0xC0,0x00,0x40,0x7F,0x7F,0x48,0x08,0x0F,0x07,0x00, // -p-  0xC0,0xE0,0x20,0x20,0xC0,0xE0,0x20,0x00,0x07,0x0F,0x08,0x48,0x7F,0x7F,0x40,0x00, // -q-  0x20,0xE0,0xC0,0x60,0x20,0x60,0xC0,0x00,0x08,0x0F,0x0F,0x08,0x00,0x00,0x00,0x00, // -r-  0x40,0xE0,0xA0,0x20,0x20,0x60,0x40,0x00,0x04,0x0C,0x09,0x09,0x0B,0x0E,0x04,0x00, // -s-  0x20,0x20,0xF8,0xFC,0x20,0x20,0x00,0x00,0x00,0x00,0x07,0x0F,0x08,0x0C,0x04,0x00, // -t-  0xE0,0xE0,0x00,0x00,0xE0,0xE0,0x00,0x00,0x07,0x0F,0x08,0x08,0x07,0x0F,0x08,0x00, // -u-  0x00,0xE0,0xE0,0x00,0x00,0xE0,0xE0,0x00,0x00,0x03,0x07,0x0C,0x0C,0x07,0x03,0x00, // -v-  0xE0,0xE0,0x00,0x00,0x00,0xE0,0xE0,0x00,0x07,0x0F,0x0C,0x07,0x0C,0x0F,0x07,0x00, // -w-  0x20,0x60,0xC0,0x80,0xC0,0x60,0x20,0x00,0x08,0x0C,0x07,0x03,0x07,0x0C,0x08,0x00, // -x-  0xE0,0xE0,0x00,0x00,0x00,0xE0,0xE0,0x00,0x47,0x4F,0x48,0x48,0x68,0x3F,0x1F,0x00, // -y-  0x60,0x60,0x20,0xA0,0xE0,0x60,0x20,0x00,0x0C,0x0E,0x0B,0x09,0x08,0x0C,0x0C,0x00, // -z-  0x00,0x40,0x40,0xF8,0xBC,0x04,0x04,0x00,0x00,0x00,0x00,0x07,0x0F,0x08,0x08,0x00, // -{-  0x00,0x00,0x00,0xBC,0xBC,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x0F,0x00,0x00,0x00, // -|-  0x00,0x04,0x04,0xBC,0xF8,0x40,0x40,0x00,0x00,0x08,0x08,0x0F,0x07,0x00,0x00,0x00, // -}-  0x08,0x0C,0x04,0x0C,0x08,0x0C,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // -~- } ; #endif  //Tab_Ascii_8x16_CALL1 //=======8x16======================================================================= //#ifdef   Tab_Ascii_8x16_CALL2  // #ifdef  Display_Num_8x16_CALL  const PROGMEM uint8_t Tab_Ascii_8x162[95][16]={  //细体字形 /*--  文字:     --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*--  文字:  !  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00, /*--  文字:  "  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*--  文字:  #  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00, /*--  文字:  $  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00, /*--  文字:  %  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00, /*--  文字:  &  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10, /*--  文字:  '  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*--  文字:  (  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00, /*--  文字:  )  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00, /*--  文字:  *  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00, /*--  文字:  +  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00, /*--  文字:  ,  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00, /*--  文字:  -  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01, /*--  文字:  .  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00, /*--  文字:  /  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00, /*--  文字:  0  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00, /*--  文字:  1  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00, /*--  文字:  2  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00, /*--  文字:  3  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00, /*--  文字:  4  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00, /*--  文字:  5  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00, /*--  文字:  6  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00, /*--  文字:  7  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00, /*--  文字:  8  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00, /*--  文字:  9  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00, /*--  文字:  :  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00, /*--  文字:  ;  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00, /*--  文字:  <  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00, /*--  文字:  =  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00, /*--  文字:  >  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00, /*--  文字:  ?  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00, /*--  文字:  @  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00, /*--  文字:  A  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20, /*--  文字:  B  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00, /*--  文字:  C  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00, /*--  文字:  D  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00, /*--  文字:  E  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00, /*--  文字:  F  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00, /*--  文字:  G  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00, /*--  文字:  H  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20, /*--  文字:  I  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00, /*--  文字:  J  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00, /*--  文字:  K  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00, /*--  文字:  L  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00, /*--  文字:  M  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00, /*--  文字:  N  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00, /*--  文字:  O  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00, /*--  文字:  P  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00, /*--  文字:  Q  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00, /*--  文字:  R  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20, /*--  文字:  S  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00, /*--  文字:  T  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00, /*--  文字:  U  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00, /*--  文字:  V  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00, /*--  文字:  W  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00, /*--  文字:  X  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20, /*--  文字:  Y  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00, /*--  文字:  Z  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00, /*--  文字:  [  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00, /*--  文字:  \  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00, /*--  文字:  ]  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00, /*--  文字:  ^  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*--  文字:  _  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, /*--  文字:  `  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*--  文字:  a  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20, /*--  文字:  b  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00, /*--  文字:  c  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00, /*--  文字:  d  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20, /*--  文字:  e  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00, /*--  文字:  f  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00, /*--  文字:  g  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00, /*--  文字:  h  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20, /*--  文字:  i  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00, /*--  文字:  j  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00, /*--  文字:  k  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00, /*--  文字:  l  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00, /*--  文字:  m  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F, /*--  文字:  n  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20, /*--  文字:  o  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00, /*--  文字:  p  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00, /*--  文字:  q  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80, /*--  文字:  r  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00, /*--  文字:  s  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00, /*--  文字:  t  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00, /*--  文字:  u  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20, /*--  文字:  v  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00, /*--  文字:  w  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00, /*--  文字:  x  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00, /*--  文字:  y  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00, /*--  文字:  z  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00, /*--  文字:  {  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40, /*--  文字:  |  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00, /*--  文字:  }  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00, /*--  文字:  ~  --*/ /*--  Comic Sans MS12;  此字体下对应的点阵为:宽x高=8x16   --*/ 0x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; ///#endif //#endif  //Tab_Ascii_8x16_CALL1 //=======5x7======================================================================= //#ifdef  Tab_Ascii_5x7_CALL    const PROGMEM uint8_t Tab_Ascii_5x71[95][5]={ /*全体ASCII 列表:5x7点阵*/ 0x00,0x00,0x00,0x00,0x00,//space 0x00,0x00,0x4f,0x00,0x00,//! 0x00,0x07,0x00,0x07,0x00,//" 0x14,0x7f,0x14,0x7f,0x14,//# 0x24,0x2a,0x7f,0x2a,0x12,//$ 0x23,0x13,0x08,0x64,0x62,//% 0x36,0x49,0x55,0x22,0x50,//& 0x00,0x05,0x07,0x00,0x00,//] 0x00,0x1c,0x22,0x41,0x00,//( 0x00,0x41,0x22,0x1c,0x00,//) 0x14,0x08,0x3e,0x08,0x14,//* 0x08,0x08,0x3e,0x08,0x08,//+ 0x00,0x50,0x30,0x00,0x00,//, 0x08,0x08,0x08,0x08,0x08,//- 0x00,0x60,0x60,0x00,0x00,//. 0x20,0x10,0x08,0x04,0x02,/// 0x3e,0x51,0x49,0x45,0x3e,//0 0x00,0x42,0x7f,0x40,0x00,//1 0x42,0x61,0x51,0x49,0x46,//2 0x21,0x41,0x45,0x4b,0x31,//3 0x18,0x14,0x12,0x7f,0x10,//4 0x27,0x45,0x45,0x45,0x39,//5 0x3c,0x4a,0x49,0x49,0x30,//6 0x01,0x71,0x09,0x05,0x03,//7 0x36,0x49,0x49,0x49,0x36,//8 0x06,0x49,0x49,0x29,0x1e,//9 0x00,0x36,0x36,0x00,0x00,//: 0x00,0x56,0x36,0x00,0x00,//; 0x08,0x14,0x22,0x41,0x00,//< 0x14,0x14,0x14,0x14,0x14,//= 0x00,0x41,0x22,0x14,0x08,//> 0x02,0x01,0x51,0x09,0x06,//? 0x32,0x49,0x79,0x41,0x3e,//@ 0x7e,0x11,0x11,0x11,0x7e,//A 0x7f,0x49,0x49,0x49,0x36,//B 0x3e,0x41,0x41,0x41,0x22,//C 0x7f,0x41,0x41,0x22,0x1c,//D 0x7f,0x49,0x49,0x49,0x41,//E 0x7f,0x09,0x09,0x09,0x01,//F 0x3e,0x41,0x49,0x49,0x7a,//G 0x7f,0x08,0x08,0x08,0x7f,//H 0x00,0x41,0x7f,0x41,0x00,//I 0x20,0x40,0x41,0x3f,0x01,//J 0x7f,0x08,0x14,0x22,0x41,//K 0x7f,0x40,0x40,0x40,0x40,//L 0x7f,0x02,0x0c,0x02,0x7f,//M 0x7f,0x04,0x08,0x10,0x7f,//N 0x3e,0x41,0x41,0x41,0x3e,//O 0x7f,0x09,0x09,0x09,0x06,//P 0x3e,0x41,0x51,0x21,0x5e,//Q 0x7f,0x09,0x19,0x29,0x46,//R 0x46,0x49,0x49,0x49,0x31,//S 0x01,0x01,0x7f,0x01,0x01,//T 0x3f,0x40,0x40,0x40,0x3f,//U 0x1f,0x20,0x40,0x20,0x1f,//V 0x3f,0x40,0x38,0x40,0x3f,//W 0x63,0x14,0x08,0x14,0x63,//X 0x07,0x08,0x70,0x08,0x07,//Y 0x61,0x51,0x49,0x45,0x43,//Z 0x00,0x7f,0x41,0x41,0x00,//[ 0x02,0x04,0x08,0x10,0x20,//\ 0x00,0x41,0x41,0x7f,0x00,//] 0x04,0x02,0x01,0x02,0x04,//^ 0x40,0x40,0x40,0x40,0x40,//_ 0x01,0x02,0x04,0x00,0x00,//` 0x20,0x54,0x54,0x54,0x78,//a 0x7f,0x48,0x48,0x48,0x30,//b 0x38,0x44,0x44,0x44,0x44,//c 0x30,0x48,0x48,0x48,0x7f,//d 0x38,0x54,0x54,0x54,0x58,//e 0x00,0x08,0x7e,0x09,0x02,//f 0x48,0x54,0x54,0x54,0x3c,//g 0x7f,0x08,0x08,0x08,0x70,//h 0x00,0x00,0x7a,0x00,0x00,//i 0x20,0x40,0x40,0x3d,0x00,//j 0x7f,0x20,0x28,0x44,0x00,//k 0x00,0x41,0x7f,0x40,0x00,//l 0x7c,0x04,0x38,0x04,0x7c,//m 0x7c,0x08,0x04,0x04,0x78,//n 0x38,0x44,0x44,0x44,0x38,//o 0x7c,0x14,0x14,0x14,0x08,//p 0x08,0x14,0x14,0x14,0x7c,//q 0x7c,0x08,0x04,0x04,0x08,//r 0x48,0x54,0x54,0x54,0x24,//s 0x04,0x04,0x3f,0x44,0x24,//t 0x3c,0x40,0x40,0x40,0x3c,//u 0x1c,0x20,0x40,0x20,0x1c,//v 0x3c,0x40,0x30,0x40,0x3c,//w 0x44,0x28,0x10,0x28,0x44,//x 0x04,0x48,0x30,0x08,0x04,//y 0x44,0x64,0x54,0x4c,0x44,//z 0x08,0x36,0x41,0x41,0x00,//{ 0x00,0x00,0x77,0x00,0x00,//| 0x00,0x41,0x41,0x36,0x08,//} 0x04,0x02,0x02,0x02,0x01,//~ }; //#endif  //Tab_Ascii_5x7_CALL uint8  zhuang1[]={ /*--  文字:  状  --*/ /*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/ 0x08,0x30,0x00,0xFF,0x20,0x20,0x20,0x20,0xFF,0x20,0xE1,0x26,0x2C,0x20,0x20,0x00, 0x04,0x02,0x01,0xFF,0x40,0x20,0x18,0x07,0x00,0x00,0x03,0x0C,0x30,0x60,0x20,0x00 }; uint8  tai1[]={ /*--  文字:  态  --*/ /*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/ 0x00,0x04,0x04,0x04,0x84,0x44,0x34,0x4F,0x94,0x24,0x44,0x84,0x84,0x04,0x00,0x00, 0x00,0x60,0x39,0x01,0x00,0x3C,0x40,0x42,0x4C,0x40,0x40,0x70,0x04,0x09,0x31,0x00 }; uint8  shi1[]={ /*--  文字:  使  --*/ /*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/ 0x40,0x20,0xF0,0x1C,0x07,0xF2,0x94,0x94,0x94,0xFF,0x94,0x94,0x94,0xF4,0x04,0x00, 0x00,0x00,0x7F,0x00,0x40,0x41,0x22,0x14,0x0C,0x13,0x10,0x30,0x20,0x61,0x20,0x00 }; uint8  yong1[]={ /*--  文字:  用  --*/ /*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/ 0x00,0x00,0x00,0xFE,0x22,0x22,0x22,0x22,0xFE,0x22,0x22,0x22,0x22,0xFE,0x00,0x00, 0x80,0x40,0x30,0x0F,0x02,0x02,0x02,0x02,0xFF,0x02,0x02,0x42,0x82,0x7F,0x00,0x00 }; //x=9 y=16 点阵 0-9 const PROGMEM uint8_t  lcd_numbers_lit[]={ 0x00,0xE0,0xE0,0x60,0x20,0x60,0xE0,0xE0,0x00,//0 0x00,0x7F,0x7F,0x60,0x40,0x60,0x7F,0x7F,0x00, 0x00,0x00,0x40,0x40,0xE0,0xE0,0x00,0x00,0x00,//1 0x00,0x00,0x00,0x00,0x7F,0x7F,0x00,0x00,0x00, 0x00,0xE0,0xE0,0x20,0x20,0xE0,0xE0,0xC0,0x00,//2 0x00,0x71,0x79,0x78,0x5E,0x47,0x43,0x41,0x00, 0x00,0xE0,0xE0,0x20,0x20,0xE0,0xE0,0xC0,0x00,//3 0x00,0x78,0x78,0x42,0x47,0x7F,0x7D,0x39,0x00, 0x00,0x00,0x00,0x80,0xE0,0xE0,0xE0,0x00,0x00,//4 0x00,0x0E,0x0F,0x0B,0x7F,0x7F,0x7F,0x08,0x00, 0x00,0xE0,0xE0,0xE0,0x20,0x20,0x20,0x20,0x00,//5 0x00,0x73,0x73,0x43,0x41,0x7F,0x7F,0x3E,0x00, 0x00,0xE0,0xE0,0x60,0x20,0x60,0x60,0x60,0x00,//6 0x00,0x7F,0x7F,0x43,0x43,0x7F,0x7E,0x3C,0x00, 0x00,0x20,0x20,0x20,0xA0,0xE0,0xE0,0x60,0x00,//7 0x00,0x00,0x40,0x78,0x7F,0x0F,0x01,0x00,0x00, 0x00,0xE0,0xE0,0x20,0x20,0x20,0xE0,0xE0,0x00,//8 0x00,0x7D,0x7D,0x47,0x42,0x47,0x7D,0x7D,0x00, 0x00,0xE0,0xE0,0x20,0x20,0xE0,0xE0,0x80,0x00,//9 0x00,0x67,0x6F,0x4C,0x6C,0x7F,0x3F,0x0F,0x00 }; //x=12 y=16 点阵 0-9数字 const PROGMEM uint8_t  lcd_numbers[]={ 0x00,0xF0,0xFC,0xFC,0x0E,0x02,0x02,0x0E,0xFC,0xFC,0xF0,0x00,//0 0x00,0x07,0x3F,0x3F,0x70,0x40,0x40,0x70,0x3F,0x3F,0x07,0x00, 0x00,0x00,0x00,0x08,0x08,0xFC,0xFE,0xFE,0x00,0x00,0x00,0x00,//1 0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00,0x00,0x00, 0x00,0x38,0x3C,0x3E,0x06,0x02,0x86,0xFE,0xFC,0x78,0x00,0x00,//2 0x00,0x60,0x78,0x7C,0x5E,0x4F,0x43,0x41,0x40,0x40,0x00,0x00, 0x00,0x18,0x1C,0x1E,0x86,0x82,0xC6,0xFE,0x7C,0x38,0x00,0x00,//3 0x00,0x1C,0x3C,0x7C,0x60,0x40,0x61,0x7F,0x3F,0x1E,0x00,0x00, 0x00,0x00,0x80,0xC0,0xF0,0x3C,0xFE,0xFE,0xFE,0x00,0x00,0x00,//4 0x00,0x06,0x07,0x05,0x04,0x04,0x7F,0x7F,0x7F,0x04,0x04,0x00, 0x00,0x00,0xFE,0xFE,0xFE,0x62,0x62,0xE2,0xE2,0x82,0x00,0x00,//5 0x00,0x18,0x38,0x78,0x60,0x40,0x60,0x7F,0x3F,0x1F,0x00,0x00, 0x00,0xF0,0xFC,0xFC,0xCE,0x42,0xC6,0xCE,0x8E,0x0C,0x00,0x00,//6 0x00,0x0F,0x3F,0x7F,0x60,0x40,0x60,0x7F,0x3F,0x1F,0x00,0x00, 0x00,0x02,0x02,0x02,0x02,0x82,0xF2,0xFE,0x7E,0x0E,0x00,0x00,//7 0x00,0x00,0x00,0x60,0x7C,0x7F,0x1F,0x03,0x00,0x00,0x00,0x00, 0x00,0x38,0x7C,0x7E,0xC6,0x82,0x82,0xC6,0x7E,0x7C,0x38,0x00,//8 0x00,0x1E,0x3F,0x7F,0x61,0x40,0x40,0x61,0x7F,0x3F,0x1E,0x00, 0x00,0xF8,0xFC,0xFE,0x06,0x02,0x06,0xFE,0xFC,0xF0,0x00,0x00,//9 0x00,0x30,0x71,0x73,0x63,0x42,0x73,0x3F,0x1F,0x07,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//. 0x00,0x00,0x00,0x38,0x38,0x38,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,//- 0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00 }; const PROGMEM uint8_t  Tab_Ascii_5x72[95][5]={ /*全体ASCII 列表:5x7点阵*/ 0x00,0x00,0x00,0x00,0x00,//space 0x00,0x00,0x4f,0x00,0x00,//! 0x00,0x07,0x00,0x07,0x00,//" 0x14,0x7f,0x14,0x7f,0x14,//# 0x24,0x2a,0x7f,0x2a,0x12,//$ 0x23,0x13,0x08,0x64,0x62,//% 0x36,0x49,0x55,0x22,0x50,//& 0x00,0x05,0x07,0x00,0x00,//] 0x00,0x1c,0x22,0x41,0x00,//( 0x00,0x41,0x22,0x1c,0x00,//) 0x14,0x08,0x3e,0x08,0x14,//* 0x08,0x08,0x3e,0x08,0x08,//+ 0x00,0x50,0x30,0x00,0x00,//, 0x08,0x08,0x08,0x08,0x08,//- 0x00,0x60,0x60,0x00,0x00,//. 0x20,0x10,0x08,0x04,0x02,/// 0x3e,0x51,0x49,0x45,0x3e,//0 0x00,0x42,0x7f,0x40,0x00,//1 0x42,0x61,0x51,0x49,0x46,//2 0x21,0x41,0x45,0x4b,0x31,//3 0x18,0x14,0x12,0x7f,0x10,//4 0x27,0x45,0x45,0x45,0x39,//5 0x3c,0x4a,0x49,0x49,0x30,//6 0x01,0x71,0x09,0x05,0x03,//7 0x36,0x49,0x49,0x49,0x36,//8 0x06,0x49,0x49,0x29,0x1e,//9 0x00,0x36,0x36,0x00,0x00,//: 0x00,0x56,0x36,0x00,0x00,//; 0x08,0x14,0x22,0x41,0x00,//< 0x14,0x14,0x14,0x14,0x14,//= 0x00,0x41,0x22,0x14,0x08,//> 0x02,0x01,0x51,0x09,0x06,//? 0x32,0x49,0x79,0x41,0x3e,//@ 0x7e,0x11,0x11,0x11,0x7e,//A 0x7f,0x49,0x49,0x49,0x36,//B 0x3e,0x41,0x41,0x41,0x22,//C 0x7f,0x41,0x41,0x22,0x1c,//D 0x7f,0x49,0x49,0x49,0x41,//E 0x7f,0x09,0x09,0x09,0x01,//F 0x3e,0x41,0x49,0x49,0x7a,//G 0x7f,0x08,0x08,0x08,0x7f,//H 0x00,0x41,0x7f,0x41,0x00,//I 0x20,0x40,0x41,0x3f,0x01,//J 0x7f,0x08,0x14,0x22,0x41,//K 0x7f,0x40,0x40,0x40,0x40,//L 0x7f,0x02,0x0c,0x02,0x7f,//M 0x7f,0x04,0x08,0x10,0x7f,//N 0x3e,0x41,0x41,0x41,0x3e,//O 0x7f,0x09,0x09,0x09,0x06,//P 0x3e,0x41,0x51,0x21,0x5e,//Q 0x7f,0x09,0x19,0x29,0x46,//R 0x46,0x49,0x49,0x49,0x31,//S 0x01,0x01,0x7f,0x01,0x01,//T 0x3f,0x40,0x40,0x40,0x3f,//U 0x1f,0x20,0x40,0x20,0x1f,//V 0x3f,0x40,0x38,0x40,0x3f,//W 0x63,0x14,0x08,0x14,0x63,//X 0x07,0x08,0x70,0x08,0x07,//Y 0x61,0x51,0x49,0x45,0x43,//Z 0x00,0x7f,0x41,0x41,0x00,//[ 0x02,0x04,0x08,0x10,0x20,// 0x00,0x41,0x41,0x7f,0x00,//] 0x04,0x02,0x01,0x02,0x04,//^ 0x40,0x40,0x40,0x40,0x40,//_ 0x01,0x02,0x04,0x00,0x00,//` 0x20,0x54,0x54,0x54,0x78,//a 0x7f,0x48,0x48,0x48,0x30,//b 0x38,0x44,0x44,0x44,0x44,//c 0x30,0x48,0x48,0x48,0x7f,//d 0x38,0x54,0x54,0x54,0x58,//e 0x00,0x08,0x7e,0x09,0x02,//f 0x48,0x54,0x54,0x54,0x3c,//g 0x7f,0x08,0x08,0x08,0x70,//h 0x00,0x00,0x7a,0x00,0x00,//i 0x20,0x40,0x40,0x3d,0x00,//j 0x7f,0x20,0x28,0x44,0x00,//k 0x00,0x41,0x7f,0x40,0x00,//l 0x7c,0x04,0x38,0x04,0x7c,//m 0x7c,0x08,0x04,0x04,0x78,//n 0x38,0x44,0x44,0x44,0x38,//o 0x7c,0x14,0x14,0x14,0x08,//p 0x08,0x14,0x14,0x14,0x7c,//q 0x7c,0x08,0x04,0x04,0x08,//r 0x48,0x54,0x54,0x54,0x24,//s 0x04,0x04,0x3f,0x44,0x24,//t 0x3c,0x40,0x40,0x40,0x3c,//u 0x1c,0x20,0x40,0x20,0x1c,//v 0x3c,0x40,0x30,0x40,0x3c,//w 0x44,0x28,0x10,0x28,0x44,//x 0x04,0x48,0x30,0x08,0x04,//y 0x44,0x64,0x54,0x4c,0x44,//z 0x08,0x36,0x41,0x41,0x00,//{ 0x00,0x00,0x77,0x00,0x00,//| 0x00,0x41,0x41,0x36,0x08,//} 0x04,0x02,0x02,0x02,0x01,//~ }; /////////////// #define Start_T1 TCCR1B|=_BV(CS11);TCNT1=0//复位预计分频器并开启定时器T1 #define Stop_T1 TCCR1B&=~_BV(CS11) //关闭定时器T1 //数码管的段码编码 unsigned char table[10] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; volatile unsigned char i,j,k; volatile unsigned char IRcode;                //定义一个长度为4字节的无符号long类型变量来存储代码 volatile unsigned char IR_OK=0;     //IR信号接收有效 当程序响应接收以后请马上清零 这样才会继续接收下一IR码 volatile unsigned char IR_con=0; //IR信号当前接收位 0时表示第0位即同步码(4.5ms高电平) volatile unsigned int Pulse_length=0;          //捕获的脉冲宽度 volatile unsigned char ICP_Parity=0;           //捕获中断奇偶次计数 1时为偶次 并在此时判断脉宽 volatile unsigned char address; volatile unsigned char code_data; volatile unsigned char code_data1; unsigned char clrbit; #define FREQ 8 //定义单片机工作频率为 4M /////////////// //**************************************************************** // 函数名称:DelayLcd // 函数功能:延时  // 入口参数: // 出口参数: //*****************************************************************     void DelayLcd(uint16 i)           {     uint16 j;     for(j=200;j>0;j--)         for(;i>0;i--);     //while(i--); } //**************************************************************** // 函数名称:LcdWriteCommand // 函数功能:写指令到LCD模块 // 入口参数:数据 // 出口参数: //***************************************************************** void LcdWriteCommand(uint8 data1) // {  uint8 i ;  P_LCDCS0 ;  P_LCDRS0 ;  for(i=8;i>0;i--)  {   P_LCDCLK0;   if(data1&0x80) P_LCDDAT1;   else P_LCDDAT0;   P_LCDCLK1;   data1 <<= 1;  } } //**************************************************************** // 函数名称:LcdWritedata // 函数功能:写数据到LCD模块 // 入口参数:数据 // 出口参数: //***************************************************************** void LcdWritedata(uint8 data1) // {  uint8 i;  P_LCDCS0 ;  P_LCDRS1 ;  for(i=8;i>0;i--)  {   P_LCDCLK0;   if(data1&0x80) P_LCDDAT1;   else P_LCDDAT0;   P_LCDCLK1;   data1 <<= 1;  } } //**************************************************************** // 函数名称:Lcd_SetAddr // 函数功能:设置LCD显示地址 // 入口参数: 页地址 列地址 // 出口参数: //***************************************************************** void Lcd_SetAddr(uint8 page,uint8 column) { //LcdWriteCommand(0xb0 | (y+yy)); //LcdWriteCommand(0x10 | (x>>4)); //LcdWriteCommand(0x00 | (x&0x0f));  //P_LCDCS0 ;  LcdWriteCommand(0xb0|page);   /*设置页地址*/  LcdWriteCommand((column>>4)|0x10); /*设置列地址的高4位*/  LcdWriteCommand(column&0x0f); /*设置列地址的低4位*/ } //////  void Display_Graphic_32x2(uint8 page,uint8 column,PROGMEM uint8_t  *dp) //   电池显示 0、2、4、6、8、10 {  uint8 i,j;  uint8 page_address;  uint8 column_address_L,column_address_H;  page_address = 0xb0|page;  column_address_L =(column&0x0f);  column_address_H =(column>>4)|0x10;   P_LCDCS0 ;  for(j=0;j<2;j++)  {   LcdWriteCommand(page_address+j);   /*设置页地址*/   LcdWriteCommand(column_address_H); /*设置列地址的高4位*/   LcdWriteCommand(column_address_L); /*设置列地址的低4位*/   for (i=32;i>0;i--) //写32行   {     LcdWritedata(pgm_read_byte(dp++));  /*写数据到LCD,每写完一个8位的数据后列地址自动加1*/       }   LcdWritedata(0x00);  }  P_LCDCS1 ; } //#ifdef  Display_Graphic_32x32_CALL void Display_Graphic_32x32(uint8 page,uint8 column,PROGMEM uint8_t *dp) {  uint8 i,j;  uint8 page_address;  uint8 column_address_L,column_address_H;  page_address = 0xb0|page;  column_address_L =(column&0x0f);  column_address_H =(column>>4)|0x10;   P_LCDCS0 ; &

    标签: 程序

    上传时间: 2016-03-03

    上传用户:彦 yan

  • AVR单片机转速表

    /****************************************************************                  外部晶振8M                  PA0~3:四位数码管的位选                  PB0~7:数码管的8位段选                  外部中断0用于计数                  定时器0溢出中断的定时为1ms                  说明 :检测到水流较小时,继电器延时1秒关闭  ******************************************************************/                #include<iom16v.h>   #include<macros.h>   #define uchar unsigned char   #define uint unsigned int       char led_7[10]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F};  //数码管段选        char position[4]={0xfe,0xfd,0xfb,0xf7};//数码管位选        uint sumnum=0;  //用于记录1000ms内进入中断的次数        uint time=0;   //记录进入比较定时器0的次数        uint num=0;     //记录1ms内进入中断的次数        uint count=0;   //进入外部中断0的次数        uchar flag;        uint sumnum1;   //记录100ms内的数目       /***************************函数声明***************************/        void delay();        void display(uint m );        void init();        void init_0();        void init_2();    void _delay_us(uint l)   {        unsigned int i;        for(i=0;i<l;i++)        {        asm("nop");        }   }           /**************************主函数***********************************/       void main()   {        init();        init_0();        init_2();        while(sumnum<5)        {           PORTD=0XBF;           segdisplay(sumnum1);        }       while(1)       {           segdisplay(sumnum1);       }           }        /*************************扫描数码管时的延时函数*********************/        void delay()    {         uchar i,j;         for(i=6;i>0;i--)         for(j=225;j>0;j--);    }        /************************数码管显示函数*****************************/       void segdisplay( int temp)        {         int seg[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};         int temp1,temp2,temp3,temp4;         temp1=temp/1000;         temp2=(temp/100)%10;         temp3=(temp/10)%10;         temp4=temp%10;         DDRB=0xff;         DDRA|=0x0f;           PORTA=~BIT(3);           PORTB=seg[temp1];           _delay_us(100);           PORTA=~BIT(2);           PORTB=seg[temp2];           _delay_us(100);           PORTA=~BIT(1);           PORTB=seg[temp3];           _delay_us(100);           PORTA=~BIT(0);           PORTB=seg[temp4];           _delay_us(100);       }        /***********************管脚初始化函数*********************/        void init()    {                      DDRD|=0X40;   //PD4 设置为输出             PORTD=0XBF;                DDRA=0XFF;             DDRB=0XFF;             PORTA=0XFF;             PORTB=0XFF;    }        /***********************外部中断0初始化*********************/        void init_0()    {         MCUCR=0X02;   //INT0为下降沿触发         GICR=0X40;   //使能INT0中断         SREG=0X80;  //使能总中断    }        /**********************定时器2初始化***********************/        void init_2()    {         TCCR0=0x03;   // 内部时钟,64 分频(8M/64=125KHz)          TCNT0=0x83;   //装初值           TIMSK=0x01;   // 允许 T/C0溢出中断中断      }          /***********************外部中断0子函数********************/        #pragma interrupt_handler int0_isr:2        void int0_isr(void)        {             count++;        }        /*********************定时计数器0溢出中断子函数*****************/       #pragma interrupt_handler int0_over:10        void int0_over(void)       {           TCNT0=0x83;   //重装初值            if((time%100) == 0)               sumnum1 = num;           if(time == 1000)           {               sumnum=num;               if(sumnum<10)               {                                      if((flag==1)&&(sumnum<10))                   {                       PORTD=0XFF;                       flag=0;                   }                                      flag++;               }               else                       PORTD=0XBF;               num=0;               time=0;           }           num+=count;           count=0;           ++time;        } 

    标签: C语言

    上传时间: 2016-03-09

    上传用户:彦 yan

  • 红外遥控RGB

    #include "STC90.h" #include < intrins.h > #define uchar unsigned char #define uint unsigned int #define led_port P1 sbit IR_RE = P3^2; sbit led_r = P1^3; sbit led_g = P1^4; sbit led_b = P1^5; sbit led_wd = P1^7; sbit K1 =P3^0 ; //增加键 sbit K2 =P3^1 ; //减少键 sbit BEEP =P3^7 ; //蜂鸣器 uchar temp,temp1; bit k=0; //红外解码判断标志位,为0则为有效信号,为1则为无效 bit Flag2; uchar date[4]={0,0,0,0}; //date数组为存放地址原码,反码,数据原码,反码 uint lade_1,lade_2,lade_3,lade_4; uint num; uchar date_ram,ee_temp,ee_temp1; uchar WDT_NUM=0; uchar const dofly[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};// 显示段码值01234567 uchar code seg[]={7,6,5,4,3,2,1,0};//分别对应相应的数码管点亮,即位码 unsigned long disp_date; void fade(); void fade1(); /*************************** 看门狗子程序*************************/ void watchdog_timer() { if(WDT_NUM==5) { WDT_NUM=0; led_wd=!led_wd; } WDT_NUM++; WDT_CONTR=0x3f; } /******************************************************************/ void delay(unsigned int cnt) { while(--cnt); } /*--------------------------延时1ms程子程序-----------------------*/ void delay_1ms(uint z) { uint x,y; for(x=z;x>0;x--) for(y=126;y>0;y--); } /*--------------------------延时1ms程子程序-----------------------*/ delay1000() { uchar i,j; i=5; do{j=95; do{j--;} while(j); i--; } while(i); } /*---------------------------延时882us子程序-----------------------*/ delay882() { uchar i,j; i=6; do{j=71; do{j--;} while(j); i--; }while(i); } /*--------------------------延时2400us程子程序-----------------------*/ delay2400() { uchar i,j; i=5; do{j=237; do{j--;} while(j); i--; }while(i); } /**********************************************************************/ /* void display() { uchar i; for(i=0;i<8;i++) { P0=dofly[disp_date%10];//取显示数据,段码 P2=seg[i]; //取位码 delay_1ms(1); disp_date/=10; } } */ /*********************************************************************/ uchar EEPROM_read(uint addr)//EEPROM字节读 { ISP_CONTR=0x83; //系统时钟<12M时,对ISP_CONTR寄存器设置的值,本电路为11.0592M ISP_CMD=1; //字节读 ISP_ADDRH=(addr&0xff00)>>8; ISP_ADDRL=addr&0x00ff; ISP_TRIG=0x46; ISP_TRIG=0xb9; _nop_(); _nop_(); return ISP_DATA; } //-------------------------------------------------------------------- void EEPROM_write(uint addr,uchar dat)//EEPROM字节写 { ISP_CONTR=0x83; //系统时钟<12M时,对ISP_CONTR寄存器设置的值,本电路为11.0592M ISP_CMD=2; //字节编程 ISP_ADDRH=(addr&0xff00)>>8; ISP_ADDRL=addr&0x00ff; ISP_DATA=dat; ISP_TRIG=0x46; ISP_TRIG=0xb9; _nop_(); _nop_(); } //-------------------------------------------------------------------- void EEPROM_ERASE(uint addr)//EEPROM扇区擦除 { ISP_CONTR=0x83; //系统时钟<12M时,对ISP_CONTR寄存器设置的值,本电路为11.0592M ISP_CMD=3; //扇区擦除 ISP_ADDRH=(addr&0xff00)>>8; ISP_ADDRL=addr&0x00ff; ISP_TRIG=0x46; ISP_TRIG=0xb9; _nop_(); _nop_(); } //************************************************************** /*----------------------------------------------------------*/ /*-----------------------红外解码程序(核心)-----------------*/ /*----------------------------------------------------------*/ void IR_decode() { uchar i,j; while(IR_RE==0); delay2400(); if(IR_RE==1) //延时2.4ms后如果是高电平则是新码 { delay1000(); delay1000(); for(i=0;i<4;i++) { for(j=0;j<8;j++) { while(IR_RE==0); //等待地址码第1位高电平到来 delay882(); //延时882us判断此时引脚电平 ///CY=IR_RE; if(IR_RE==0) { date[i]>>=1; date[i]=date[i]|0x00; } else if(IR_RE==1) { delay1000(); date[i]>>=1; date[i]=date[i]|0x80; } } //1位数据接收结束 } //32位二进制码接收结束 } } /* void LED_PWM() { lade_2=num; //384 lade_4=num; //384 while(lade_2!=0&Flag2==1) { for(lade_3=512;lade_3>lade_4;lade_3--) //512 { led_port=0x00; delay(1); } lade_3=512; //512 lade_4--; for(lade_1=0;lade_1<lade_2;lade_1++) { led_port=0x38; //c7 delay(1); } lade_1=0; lade_2--; if(temp!=0x0c&Flag2==1) { lade_2=0; } lade_2=num; //384 lade_4=num; //384 } } */ void calc() { EEPROM_read(0x2000); ee_temp1=ISP_DATA; ee_temp=ee_temp1&0x0f; //************************************* 1 /* if(date[3]==0xff&Flag2==1) { if(num>=20) { num=num-80; } //else num=1; LED_PWM(); } if(date[3]==0xfe&Flag2==1) { if(num<=500) { num=num+80; } // else num=511; LED_PWM(); } if(ee_temp1==0xfd) { led_port=0x00; watchdog_timer(); } if(ee_temp1==0xfc) { led_port=0x00; led_r=1; led_g=1; led_b=1; watchdog_timer(); } */ //********************************************** 2 if(ee_temp1==0xfb) { led_port=0x00; led_r=1; watchdog_timer(); } if(ee_temp1==0xfa) { led_port=0x00; led_g=1; watchdog_timer(); } if(ee_temp1==0xf9) { led_port=0x00; led_b=1; watchdog_timer(); } if(ee_temp1==0xf8) { led_port=0x00; led_r=1; led_g=1; led_b=1; watchdog_timer(); } //************************************** 3 if(ee_temp1==0xf7) { uint fade_1,fade_2,fade_3,fade_4; fade_2=448; //384 fade_4=448; //384 while(fade_2!=0&ee_temp==0x07) { for(fade_3=512;fade_3>fade_4;fade_3--) //512 { led_port=0x10; delay(1); } fade_3=512; //512 fade_4--; watchdog_timer(); for(fade_1=0;fade_1<fade_2;fade_1++) { led_port=0x08; delay(1); } fade_1=0; fade_2--; if(ee_temp!=0x07) { fade_2=0; } watchdog_timer(); fade_2=448; //384 fade_4=448; //384 } } if(ee_temp1==0xf6) { uint fade_1,fade_2,fade_3,fade_4; fade_2=448; //384 fade_4=448; //384 while(fade_2!=0&ee_temp==0x06) { for(fade_3=512;fade_3>fade_4;fade_3--) //512 { led_port=0x20; delay(1); } fade_3=512; //512 fade_4--; watchdog_timer(); for(fade_1=0;fade_1<fade_2;fade_1++) { led_port=0x10; delay(1); } fade_1=0; fade_2--; if(ee_temp!=0x06) { fade_2=0; } watchdog_timer(); fade_2=448; //384 fade_4=448; //384 } } if(ee_temp1==0xf5) { uint fade_1,fade_2,fade_3,fade_4; fade_2=448; //384 fade_4=448; //384 while(fade_2!=0&ee_temp==0x05) { for(fade_3=512;fade_3>fade_4;fade_3--) //512 { led_port=0x08; delay(1); } fade_3=512; //512 fade_4--; watchdog_timer(); for(fade_1=0;fade_1<fade_2;fade_1++) { led_port=0x20; delay(1); } fade_1=0; fade_2--; if(ee_temp!=0x05) { fade_2=0; } watchdog_timer(); fade_2=448; //384 fade_4=448; //384 } } if(ee_temp1==0xf4) { while(ee_temp==4) { led_port=0x00; led_r=1; delay_1ms(200); led_port=0x00; led_r=1; led_g=1; delay_1ms(200); led_port=0x00; led_g=1; delay_1ms(200); watchdog_timer(); led_port=0x00; led_g=1; led_b=1; delay_1ms(200); led_port=0x00; led_b=1; delay_1ms(200); led_port=0x00; led_b=1; led_r=1; delay_1ms(200); watchdog_timer(); } } //************************************** 4 if(ee_temp1==0xf3) { uint fade_1,fade_2,fade_3,fade_4; fade_2=416; //384 fade_4=416; //384 while(fade_2!=0&ee_temp==0x03) { for(fade_3=512;fade_3>fade_4;fade_3--) //512 { led_port=0x10; delay(1); } fade_3=512; //512 fade_4--; watchdog_timer(); for(fade_1=0;fade_1<fade_2;fade_1++) { led_port=0x08; delay(1); } fade_1=0; fade_2--; if(ee_temp!=0x03) { fade_2=0; } watchdog_timer(); fade_2=416; //384 fade_4=416; //384 } } if(ee_temp1==0xf2) { uint fade_1,fade_2,fade_3,fade_4; fade_2=384; //384 fade_4=384; //384 while(fade_2!=0&ee_temp==0x02) { for(fade_3=512;fade_3>fade_4;fade_3--) //512 { led_port=0x20; delay(1); } fade_3=512; //512 fade_4--; watchdog_timer(); for(fade_1=0;fade_1<fade_2;fade_1++) { led_port=0x10; delay(1); } fade_1=0; fade_2--; if(ee_temp!=0x02) { fade_2=0; } watchdog_timer(); fade_2=384; //384 fade_4=384; //384 } } if(ee_temp1==0xf1) { uint fade_1,fade_2,fade_3,fade_4; fade_2=348; //384 fade_4=348; //384 while(fade_2!=0&ee_temp==0x01) { for(fade_3=512;fade_3>fade_4;fade_3--) //512 { led_port=0x08; delay(1); } fade_3=512; //512 fade_4--; watchdog_timer(); for(fade_1=0;fade_1<fade_2;fade_1++) { led_port=0x20; delay(1); } fade_1=0; fade_2--; if(ee_temp!=0x01) { fade_2=0; } watchdog_timer(); fade_2=348; //384 fade_4=348; //384 } } if(ee_temp1==0xf0) { while(ee_temp==0) { led_port=0x00; led_r=1; delay_1ms(500); watchdog_timer(); led_port=0x00; led_g=1; delay_1ms(500); led_port=0x00; led_b=1; delay_1ms(500); watchdog_timer(); } } //******************************************** 5 if(ee_temp1==0xef) { uint fade_1,fade_2,fade_3,fade_4; fade_2=384; //384 fade_4=384; //384 while(fade_2!=0&ee_temp==0x0f) { for(fade_3=512;fade_3>fade_4;fade_3--) //512 { led_port=0x10; delay(1); } fade_3=512; //512 fade_4--; watchdog_timer(); for(fade_1=0;fade_1<fade_2;fade_1++) { led_port=0x08; delay(1); } fade_1=0; fade_2--; if(ee_temp!=0x0f) { fade_2=0; } watchdog_timer(); fade_2=384; //384 fade_4=384; //384 } } if(ee_temp1==0xee) { uint fade_1,fade_2,fade_3,fade_4; fade_2=320; //384 fade_4=320; //384 while(fade_2!=0&ee_temp==0x0e) { for(fade_3=512;fade_3>fade_4;fade_3--) //512 { led_port=0x20; delay(1); } fade_3=512; //512 fade_4--; watchdog_timer(); for(fade_1=0;fade_1<fade_2;fade_1++) { led_port=0x10; delay(1); } fade_1=0; fade_2--; if(ee_temp!=0x0e) { fade_2=0; } watchdog_timer(); fade_2=320; //384 fade_4=320; //384 } } if(ee_temp1==0xed) { uint fade_1,fade_2,fade_3,fade_4; fade_2=320; //384 fade_4=320; //384 while(fade_2!=0&ee_temp==0x0d) { for(fade_3=512;fade_3>fade_4;fade_3--) //512 { led_port=0x08; delay(1); } fade_3=512; //512 fade_4--; watchdog_timer(); for(fade_1=0;fade_1<fade_2;fade_1++) { led_port=0x20; delay(1); } fade_1=0; fade_2--; if(ee_temp!=0x0d) { fade_2=0; } watchdog_timer(); fade_2=320; //384 fade_4=320; //384 } } if(ee_temp1==0xec) fade(); //******************************************* 6 if(ee_temp1==0xeb) { led_port=0x00; led_r=1; led_g=1; watchdog_timer(); } if(ee_temp1==0xea) { led_port=0x00; //led_r=0; led_g=1; led_b=1; watchdog_timer(); } if(ee_temp1==0xe9) { led_port=0x00; led_r=1; //led_g=0; led_b=1; watchdog_timer(); } if(ee_temp1==0xe8) fade1(); } void fade() { // uchar i; uint fade_1,fade_2,fade_3,fade_4; fade_2=512; fade_4=511; while(fade_2!=0&ee_temp==0x0c) { for(fade_3=512;fade_3>fade_4;fade_3--) { led_port=0x10; delay(1); } fade_3=512; fade_4--; watchdog_timer(); for(fade_1=0;fade_1<fade_2;fade_1++) { led_port=0x08; delay(1); } fade_1=0; fade_2--; if(ee_temp!=0x0c) { fade_2=0; } } watchdog_timer(); fade_2=512; fade_4=511; while(fade_2!=0&ee_temp==0x0c) { if(ee_temp!=0x0c) { fade_2=0; } for(fade_3=512;fade_3>fade_4;fade_3--) { led_port=0x20; delay(1); // watchdog_timer(); } fade_3=512; fade_4--; watchdog_timer(); for(fade_1=0;fade_1<fade_2;fade_1++) { led_port=0x10; delay(1); // watchdog_timer(); } fade_1=0; fade_2--; } watchdog_timer(); fade_2=512; fade_4=511; while(fade_2!=0&ee_temp==0x0c) { if(ee_temp!=0x0c) { fade_2=0; } for(fade_3=512;fade_3>fade_4;fade_3--) { led_port=0x08; delay(1); watchdog_timer(); } fade_3=512; fade_4--; watchdog_timer(); for(fade_1=0;fade_1<fade_2;fade_1++) { led_port=0x20; delay(1); watchdog_timer(); } fade_1=0; fade_2--; } watchdog_timer(); } void fade1() { // uchar i; uint fade_1,fade_2,fade_3,fade_4; fade_2=128; fade_4=127; while(fade_2!=0&ee_temp==0x08) { for(fade_3=128;fade_3>fade_4;fade_3--) { led_port=0x10; delay(1); } fade_3=128; fade_4--; for(fade_1=0;fade_1<fade_2;fade_1++) { led_port=0x08; delay(1); } fade_1=0; fade_2--; if(ee_temp!=0x08) { fade_2=0; } } watchdog_timer(); fade_2=128; fade_4=127; while(fade_2!=0&ee_temp==0x08) { if(ee_temp!=0x08) { fade_2=0; } for(fade_3=128;fade_3>fade_4;fade_3--) { led_port=0x20; delay(1); } fade_3=128; fade_4--; for(fade_1=0;fade_1<fade_2;fade_1++) { led_port=0x10; delay(1); } fade_1=0; fade_2--; } watchdog_timer(); fade_2=128; fade_4=127; while(fade_2!=0&ee_temp==0x08) { if(ee_temp!=0x08) { fade_2=0; } for(fade_3=128;fade_3>fade_4;fade_3--) { led_port=0x08; delay(1); } fade_3=128; fade_4--; for(fade_1=0;fade_1<fade_2;fade_1++) { led_port=0x20; delay(1); } fade_1=0; fade_2--; } watchdog_timer(); } void init() { led_port=0x00; /* led_r=1; delay_1ms(500); led_port=0x00; led_g=1; delay_1ms(500); led_port=0x00; led_b=1; delay_1ms(500); led_port=0x00; */ delay_1ms(2); WDT_CONTR=0x3f; delay_1ms(500); } //******************************** void main() { init(); Flag2=0; SP=0x60; //堆栈指针 EX0=1; //允许外部中断0,用于检测红外遥控器按键 EA=1; num=255; while(1) { calc(); } } //******************************************************************** /*------------------------外部中断0程序-------------------------*/ /*------------------主要用于处理红外遥控键值--------------------*/ void int0() interrupt 0 { uchar i; Flag2=0; /////// k=0; EX0=0; //检测到有效信号关中断,防止干扰 for(i=0;i<4;i++) { delay1000(); if(IR_RE==1){k=1;} //刚开始为9ms的引导码. } led_port=0x00; if(k==0) { IR_decode(); //如果接收到的是有效信号,则调用解码程序 if(date[3]>=0xe8) { if(date[3]<=0xfb) { temp1=date[3]; EEPROM_ERASE(0x2000); //STC_EEROM_0X2000 temp1 EEPROM_write(0x2000,temp1); EEPROM_read(0x2000); ee_temp1=ISP_DATA; ee_temp=ee_temp1&0x0f; /* temp=date[3]&0x0f; EEPROM_ERASE(0x2004); //STC_EEROM_0X2004 temp EEPROM_write(0x2004,temp); */ } else { EEPROM_read(0x2000); ee_temp1=ISP_DATA; ee_temp=ee_temp1&0x0f; } } delay2400(); delay2400(); delay2400(); delay_1ms(500); } EX0=1; //开外部中断,允许新的遥控按键 }

    标签: RGB 红外遥控

    上传时间: 2016-07-02

    上传用户:184890962