📄 mian.i
字号:
#pragma used+
sfrb TWBR=0;
sfrb TWSR=1;
sfrb TWAR=2;
sfrb TWDR=3;
sfrb ADCL=4;
sfrb ADCH=5;
sfrw ADCW=4;
sfrb ADCSRA=6;
sfrb ADCSR=6;
sfrb ADMUX=7;
sfrb ACSR=8;
sfrb UBRRL=9;
sfrb UCSRB=0xa;
sfrb UCSRA=0xb;
sfrb UDR=0xc;
sfrb SPCR=0xd;
sfrb SPSR=0xe;
sfrb SPDR=0xf;
sfrb PIND=0x10;
sfrb DDRD=0x11;
sfrb PORTD=0x12;
sfrb PINC=0x13;
sfrb DDRC=0x14;
sfrb PORTC=0x15;
sfrb PINB=0x16;
sfrb DDRB=0x17;
sfrb PORTB=0x18;
sfrb PINA=0x19;
sfrb DDRA=0x1a;
sfrb PORTA=0x1b;
sfrb EECR=0x1c;
sfrb EEDR=0x1d;
sfrb EEARL=0x1e;
sfrb EEARH=0x1f;
sfrw EEAR=0x1e;
sfrb UBRRH=0x20;
sfrb UCSRC=0X20;
sfrb WDTCR=0x21;
sfrb ASSR=0x22;
sfrb OCR2=0x23;
sfrb TCNT2=0x24;
sfrb TCCR2=0x25;
sfrb ICR1L=0x26;
sfrb ICR1H=0x27;
sfrb OCR1BL=0x28;
sfrb OCR1BH=0x29;
sfrw OCR1B=0x28;
sfrb OCR1AL=0x2a;
sfrb OCR1AH=0x2b;
sfrw OCR1A=0x2a;
sfrb TCNT1L=0x2c;
sfrb TCNT1H=0x2d;
sfrw TCNT1=0x2c;
sfrb TCCR1B=0x2e;
sfrb TCCR1A=0x2f;
sfrb SFIOR=0x30;
sfrb OSCCAL=0x31;
sfrb TCNT0=0x32;
sfrb TCCR0=0x33;
sfrb MCUCSR=0x34;
sfrb MCUCR=0x35;
sfrb TWCR=0x36;
sfrb SPMCR=0x37;
sfrb TIFR=0x38;
sfrb TIMSK=0x39;
sfrb GIFR=0x3a;
sfrb GICR=0x3b;
sfrb OCR0=0X3c;
sfrb SPL=0x3d;
sfrb SPH=0x3e;
sfrb SREG=0x3f;
#pragma used-
#asm
#ifndef __SLEEP_DEFINED__
#define __SLEEP_DEFINED__
.EQU __se_bit=0x80
.EQU __sm_mask=0x70
.EQU __sm_powerdown=0x20
.EQU __sm_powersave=0x30
.EQU __sm_standby=0x60
.EQU __sm_ext_standby=0x70
.EQU __sm_adc_noise_red=0x10
.SET power_ctrl_reg=mcucr
#endif
#endasm
#pragma used+
void delay_us(unsigned int n);
void delay_ms(unsigned int n);
#pragma used-
flash char ASC_MSK[96*16] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x18,0x3C,0x3C,0x3C,0x18,
0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x66,0x66,0x66,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x36,0x36,0x7F,0x36,0x36,
0x36,0x7F,0x36,0x36,0x00,0x00,0x00,0x00,
0x00,0x18,0x18,0x3C,0x66,0x60,0x30,0x18,
0x0C,0x06,0x66,0x3C,0x18,0x18,0x00,0x00,
0x00,0x00,0x70,0xD8,0xDA,0x76,0x0C,0x18,
0x30,0x6E,0x5B,0x1B,0x0E,0x00,0x00,0x00,
0x00,0x00,0x00,0x38,0x6C,0x6C,0x38,0x60,
0x6F,0x66,0x66,0x3B,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x18,0x18,0x18,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x0C,0x18,0x18,0x30,0x30,
0x30,0x30,0x30,0x18,0x18,0x0C,0x00,0x00,
0x00,0x00,0x00,0x30,0x18,0x18,0x0C,0x0C,
0x0C,0x0C,0x0C,0x18,0x18,0x30,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x36,0x1C,0x7F,
0x1C,0x36,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7E,
0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x1C,0x1C,0x0C,0x18,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x1C,0x1C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x06,0x06,0x0C,0x0C,0x18,
0x18,0x30,0x30,0x60,0x60,0x00,0x00,0x00,
0x00,0x00,0x00,0x1E,0x33,0x37,0x37,0x33,
0x3B,0x3B,0x33,0x1E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x0C,0x1C,0x7C,0x0C,0x0C,
0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x66,0x66,0x06,0x0C,
0x18,0x30,0x60,0x7E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x66,0x66,0x06,0x1C,
0x06,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x30,0x30,0x36,0x36,0x36,
0x66,0x7F,0x06,0x06,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x7E,0x60,0x60,0x60,0x7C,
0x06,0x06,0x0C,0x78,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x1C,0x18,0x30,0x7C,0x66,
0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x7E,0x06,0x0C,0x0C,0x18,
0x18,0x30,0x30,0x30,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x66,0x66,0x76,0x3C,
0x6E,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x66,0x66,0x66,0x66,
0x3E,0x0C,0x18,0x38,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x00,
0x00,0x00,0x1C,0x1C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x00,
0x00,0x00,0x1C,0x1C,0x0C,0x18,0x00,0x00,
0x00,0x00,0x00,0x06,0x0C,0x18,0x30,0x60,
0x30,0x18,0x0C,0x06,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,
0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x30,0x18,0x0C,0x06,
0x0C,0x18,0x30,0x60,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x66,0x66,0x0C,0x18,
0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x7E,0xC3,0xC3,0xCF,0xDB,
0xDB,0xCF,0xC0,0x7F,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x18,0x3C,0x66,0x66,0x66,
0x7E,0x66,0x66,0x66,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x7C,0x66,0x66,0x66,0x7C,
0x66,0x66,0x66,0x7C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x66,0x66,0x60,0x60,
0x60,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x78,0x6C,0x66,0x66,0x66,
0x66,0x66,0x6C,0x78,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x7E,0x60,0x60,0x60,0x7C,
0x60,0x60,0x60,0x7E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x7E,0x60,0x60,0x60,0x7C,
0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x66,0x66,0x60,0x60,
0x6E,0x66,0x66,0x3E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x7E,
0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x18,0x18,0x18,0x18,
0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,
0x06,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x66,0x66,0x6C,0x6C,0x78,
0x6C,0x6C,0x66,0x66,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x60,0x60,0x60,0x60,
0x60,0x60,0x60,0x7E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x63,0x63,0x77,0x6B,0x6B,
0x6B,0x63,0x63,0x63,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x63,0x63,0x73,0x7B,0x6F,
0x67,0x63,0x63,0x63,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x66,0x66,0x66,0x66,
0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x7C,0x66,0x66,0x66,0x7C,
0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x66,0x66,0x66,0x66,
0x66,0x66,0x66,0x3C,0x0C,0x06,0x00,0x00,
0x00,0x00,0x00,0x7C,0x66,0x66,0x66,0x7C,
0x6C,0x66,0x66,0x66,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x66,0x60,0x30,0x18,
0x0C,0x06,0x66,0x3C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x7E,0x18,0x18,0x18,0x18,
0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,
0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,
0x66,0x66,0x3C,0x18,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x63,0x63,0x63,0x6B,0x6B,
0x6B,0x36,0x36,0x36,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x66,0x66,0x34,0x18,0x18,
0x2C,0x66,0x66,0x66,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x3C,
0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x7E,0x06,0x06,0x0C,0x18,
0x30,0x60,0x60,0x7E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x30,0x30,0x30,0x30,
0x30,0x30,0x30,0x30,0x30,0x30,0x3C,0x3C,
0x00,0x00,0x00,0x60,0x60,0x30,0x30,0x18,
0x18,0x0C,0x0C,0x06,0x06,0x00,0x00,0x00,
0x00,0x00,0x00,0x3C,0x0C,0x0C,0x0C,0x0C,
0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x3C,
0x00,0x18,0x3C,0x66,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,0xFF,0xFF,
0x00,0x38,0x18,0x0C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x3C,0x06,0x06,
0x3E,0x66,0x66,0x3E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x60,0x7C,0x66,0x66,
0x66,0x66,0x66,0x7C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x3C,0x66,0x60,
0x60,0x60,0x66,0x3C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x06,0x06,0x3E,0x66,0x66,
0x66,0x66,0x66,0x3E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x3C,0x66,0x66,
0x7E,0x60,0x60,0x3C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x1E,0x30,0x30,0x30,0x7E,
0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x3E,0x66,0x66,
0x66,0x66,0x66,0x3E,0x06,0x06,0x7C,0x7C,
0x00,0x00,0x00,0x60,0x60,0x7C,0x66,0x66,
0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,
0x00,0x00,0x18,0x18,0x00,0x78,0x18,0x18,
0x18,0x18,0x18,0x7E,0x00,0x00,0x00,0x00,
0x00,0x00,0x0C,0x0C,0x00,0x3C,0x0C,0x0C,
0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x78,0x78,
0x00,0x00,0x00,0x60,0x60,0x66,0x66,0x6C,
0x78,0x6C,0x66,0x66,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x78,0x18,0x18,0x18,0x18,
0x18,0x18,0x18,0x7E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x7E,0x6B,0x6B,
0x6B,0x6B,0x6B,0x63,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x7C,0x66,0x66,
0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x3C,0x66,0x66,
0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x7C,0x66,0x66,
0x66,0x66,0x66,0x7C,0x60,0x60,0x60,0x60,
0x00,0x00,0x00,0x00,0x00,0x3E,0x66,0x66,
0x66,0x66,0x66,0x3E,0x06,0x06,0x06,0x06,
0x00,0x00,0x00,0x00,0x00,0x66,0x6E,0x70,
0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x3E,0x60,0x60,
0x3C,0x06,0x06,0x7C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x30,0x30,0x7E,0x30,0x30,
0x30,0x30,0x30,0x1E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,
0x66,0x66,0x66,0x3E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,
0x66,0x66,0x3C,0x18,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x63,0x6B,0x6B,
0x6B,0x6B,0x36,0x36,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x3C,
0x18,0x3C,0x66,0x66,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,
0x66,0x66,0x66,0x3C,0x0C,0x18,0xF0,0xF0,
0x00,0x00,0x00,0x00,0x00,0x7E,0x06,0x0C,
0x18,0x30,0x60,0x7E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x0C,0x18,0x18,0x18,0x30,
0x60,0x30,0x18,0x18,0x18,0x0C,0x00,0x00,
0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
0x00,0x00,0x00,0x30,0x18,0x18,0x18,0x0C,
0x06,0x0C,0x18,0x18,0x18,0x30,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x71,0xDB,
0x8E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x1C,0x1C,0x00,0x00,0x00,0x00
};
typedef struct
{
char Index[4];
char Msk[32];
}typFNT_GB16;
flash typFNT_GB16 GB_16[] =
{
{"终", {0x10,0x80,0x10,0x80,0x20,0xFC,0x21,0x08,
0x45,0x90,0xFA,0x50,0x10,0x20,0x20,0x50,
0x40,0x88,0xFD,0x0E,0x02,0x64,0x00,0x10,
0x1C,0x08,0xE0,0xC0,0x40,0x30,0x00,0x08}},
{"于", {0x00,0x10,0x3F,0xF8,0x01,0x00,0x01,0x00,
0x01,0x00,0x01,0x04,0xFF,0xFE,0x01,0x00,
0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,
0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00}},
{"搞", {0x10,0x80,0x10,0x44,0x1F,0xFE,0x10,0x00,
0xFB,0xF8,0x12,0x08,0x12,0x08,0x1B,0xF8,
0x30,0x04,0xD7,0xFE,0x14,0x04,0x15,0xF4,
0x15,0x14,0x15,0xF4,0x54,0x04,0x24,0x0C}},
{"成", {0x00,0x80,0x00,0xA0,0x00,0x90,0x3F,0xFC,
0x20,0x80,0x20,0x80,0x20,0x84,0x3E,0x44,
0x22,0x48,0x22,0x48,0x22,0x30,0x2A,0x20,
0x24,0x62,0x40,0x92,0x81,0x0A,0x00,0x06}},
{"功", {0x00,0x80,0x00,0x80,0x08,0x80,0xFC,0x80,
0x10,0x84,0x17,0xFE,0x10,0x84,0x10,0x84,
0x10,0x84,0x10,0x84,0x1D,0x04,0xF1,0x04,
0x41,0x04,0x02,0x44,0x04,0x28,0x08,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}},
{"田", {0x00,0x08,0x3F,0xFC,0x21,0x08,0x21,0x08,
0x21,0x08,0x21,0x08,0x21,0x08,0x3F,0xF8,
0x21,0x08,0x21,0x08,0x21,0x08,0x21,0x08,
0x21,0x08,0x3F,0xF8,0x20,0x08,0x00,0x00}},
{"建", {0x00,0x40,0x00,0x48,0xFB,0xFC,0x08,0x48,
0x17,0xFE,0x10,0x48,0x3B,0xF8,0x08,0x40,
0x8B,0xF8,0x50,0x40,0x50,0x48,0x37,0xFC,
0x20,0x40,0x50,0x40,0x88,0x46,0x07,0xFC}},
{"钢", {0x10,0x04,0x13,0xFE,0x12,0x04,0x1E,0x04,
0x23,0x0C,0x22,0x8C,0x7E,0x54,0x92,0x24,
0x12,0x24,0x7E,0x54,0x12,0x8C,0x13,0x0C,
0x16,0x04,0x1A,0x04,0x12,0x14,0x02,0x08}},
{"中", {0x01,0x00,0x01,0x00,0x21,0x08,0x3F,0xFC,
0x21,0x08,0x21,0x08,0x21,0x08,0x21,0x08,
0x21,0x08,0x3F,0xF8,0x21,0x08,0x01,0x00,
0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00}},
{"文", {0x02,0x00,0x01,0x00,0x01,0x00,0xFF,0xFE,
0x08,0x20,0x08,0x20,0x08,0x20,0x04,0x40,
0x04,0x40,0x02,0x80,0x01,0x00,0x02,0x80,
0x04,0x60,0x18,0x1E,0xE0,0x08,0x00,0x00}},
{"测", {0x40,0x02,0x27,0xC2,0x24,0x42,0x84,0x52,
0x45,0x52,0x55,0x52,0x15,0x52,0x25,0x52,
0x25,0x52,0x25,0x52,0xC5,0x52,0x41,0x02,
0x42,0x82,0x42,0x42,0x44,0x4A,0x48,0x04}},
{"试", {0x00,0x20,0x40,0x28,0x20,0x24,0x30,0x24,
0x27,0xFE,0x00,0x20,0xE0,0x20,0x27,0xE0,
0x21,0x20,0x21,0x10,0x21,0x10,0x21,0x0A,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -