微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 嵌入式设计 > 单片机12232 C语言的驱动程序

单片机12232 C语言的驱动程序

时间:11-18 来源:互联网 点击:

clear_screen();
write_characters(0,0,pray,8);
write_characters(2,1,write_me,5);
delayms(5000);

clear_screen();
display_piture(tup);
delayms(5000);
}
}

dewei.h 文件 定义与单片机的接口

//DATA P0;
sbit rst=P2^4;//复位
sbit e1 =P2^1;// 使能
sbit e2 =P2^2;
sbit rw =P2^3;
sbit a0 =P2^0;//数据指令

table.h 文件 注入flash(code)的数据表

//字模"0123456789"
unsigned char code num[]={
0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,/*"0"*/
0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,/*"1"*/
0x00,0x70,0x08,0x08,0x08,0xF0,0x00,0x00,0x30,0x2C,0x22,0x21,0x30,0x00,/*"2"*/
0x00,0x30,0x08,0x88,0x88,0x70,0x00,0x00,0x18,0x20,0x20,0x31,0x1E,0x00,/*"3"*/
0x00,0x80,0x40,0x20,0xF8,0x00,0x00,0x06,0x05,0x04,0x24,0x3F,0x24,0x04,/*"4"*/
0x00,0xF8,0x08,0x88,0x88,0x08,0x00,0x00,0x19,0x21,0x20,0x31,0x1F,0x00,/*"5"*/
0xE0,0x10,0x88,0x88,0x88,0x18,0x00,0x0F,0x11,0x20,0x20,0x31,0x1F,0x00,/*"6"*/
0x00,0x38,0x08,0x08,0xE8,0x18,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,/*"7"*/
0x70,0x98,0x88,0x08,0x98,0x70,0x00,0x1E,0x21,0x21,0x21,0x31,0x1E,0x00,/*"8"*/
0xF0,0x08,0x08,0x08,0x18,0xE0,0x00,0x31,0x22,0x22,0x32,0x19,0x07,0x00,/*"9"*/

unsigned char code tup[]={
/*-- 一幅图像: --*/
/*-- 宽度x高度=122x32 --*/
0x00,0x00,0x00,0x70,0xF8,0xF8,0xFC,0xFC,0xFE,0xFE,0xFE,0xFE,0xFC,0xFC,0xF0,0xE0,
0xC0,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,0x80,0x40,0x20,0x10,0x48,0xD4,0xB4,0x62,0xC2,0x82,0x03,0x02,0x02,
0x02,0x84,0xC4,0xE0,0xA0,0xE0,0x60,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0xB0,0xF8,0xF0,0xF0,0xF8,0xFC,0x60,0x60,0x30,
0x18,0x00,0x00,0x00,0x80,0xC0,0xE0,0xE0,0xF0,0xF0,0xF0,0xD8,0x58,0x58,0x58,0x58,
0x58,0xD8,0xD8,0x98,0xB0,0x30,0x70,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x07,
0x07,0x07,0x02,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,0xFC,0xFC,0xFC,
0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xF8,0xF0,0xC0,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x01,0x00,0x04,
0x0D,0x1B,0x36,0x6D,0xDB,0xF6,0xED,0xFB,0xFE,0xFE,0xFF,0x7F,0x1F,0x07,0x01,0x00,
0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xFC,0xFE,0xFE,
0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,0xE0,0xC0,0xC0,0xF8,0xFE,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x3E,0xF8,0x01,0x37,
0x0C,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x60,0xFF,0xC7,0x03,0x03,0x03,0x03,0xE1,
0xFF,0x3F,0x0F,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x0F,0x3F,0x7F,0xFF,0xEF,
0xBF,0x7F,0xFF,0xC7,0x07,0x1F,0xFE,0xF8,0xB0,0x60,0x80,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x08,0x10,0x20,0x40,0x40,0x80,0x83,
0xFF,0xFF,0xFF,0xFF,0x83,0x40,0x40,0x20,0x10,0x08,0x04,0x03,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x03,0x07,0x0F,0x1F,0x3F,0x3F,0x7F,0xFF,
0xFF,0x7F,0x7F,0xFF,0xFF,0xFF,0xFF,0xDF,0x3F,0x3F,0x0F,0x61,0x3F,0x1F,0x2F,0x3F,
0x1F,0x0F,0x00,0x0F,0x07,0x03,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x1E,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x40,0x60,0x70,0x3C,0x1F,0x07,0x03,0x01,0x01,0x00,0x00,
0x01,0x07,0x07,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x44,0xEC,0x00,
0x7C,0x44,0x7C,0x00,0x7C,0x40,0x40,0x00,0x7C,0x44,0x38,0x00,0x7C,0x14,0x1C,0x00,
0x7C,0x40,0x40,0x00,0x78,0x24,0x78,0x00,0x7C,0x18,0x18,0x7C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x20,0x20,0x20,0x20,0x10,0x04,0x07,0x00,0x01,0x00,0x00,0x00,0x01,
0x05,0x03,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
unsigned char code pray[]=
{
/*------------------------------------------------------------------------------
; 源文件 / 文字 : 祝
; 宽×高(像素): 15×16
------------------------------------------------------------------------------*/
0x08,0x88,0xC9,0xEF,0xFE,0x98,0x7E,0x7E,0xC2,0xC2,0xC2,0xC2,0x7E,0x7E,0x00,
0x01,0x01,0x3F,0x3F,0x20,0x21,0x31,0x1c,0x0F,0x03,0x3F,0x3F,0x20,0x38,0x38,
/*------------------------------------------------------------------------------
; 源文件 / 文字 : 福
; 宽×高(像素): 15×16
------------------------------------------------------------------------------*/
//宽的像素数,高的像素数,宽的字节数,参数设置可选
0x08,0x08,0x88,0xEE,0xFE,0x98,0x80,0xBA,0xBA,0xAA,0xAA,0xBA,0xBA,0x82,0x00,
0x02,0x03,0x01,0x3F,0x3F,0x01,0x3F,0x3F,0x12,0x1F,0x1F,0x12,0x3F,0x3F,0x00,
/*------------------------------------------------------------------------------
; 源文件 / 文字 : 我
; 宽×高(像素): 15×16
------------------------------------------------------------------------------*/
0x00,0x14,0x14,0x96,0xFF,0xFF,0x10,0x10,0xFF,0xFF,0x10,0xDC,0xDC,0x10,0x00,
0x04,0x06,0x13,0x33,0x3F,0x1F,0x08,0x08,0x0F,0x07,0x0F,0x19,0x30,0x3c,0x3c,
/*------------------------------------------------------------------------------
; 源文件 / 文字 : 家
; 宽×高(像素): 15×16
------------------------------------------------------------------------------*/
0x00,0x8C,0x8C,0xD4,0x54,0xF4,0xF5,0xD7,0x96,0x94,0xD4,0x74,0x2C,0x0C,0x00,
0x00,0x00,0x12,0x12,0x1B,0x0D,0x26,0x23,0x3F,0x3F,0x03,0x06,0x1c,0x18,0x08,
/*------------------------------------------------------------------------------
; 源文件 / 文字 : 暑
; 宽×高(像素): 15×16
------------------------------------------------------------------------------*/
0x80,0x80,0x80,0xBE,0xBE,0xAA,0xEA,0xEA,0xAA,0xEA,0xFE,0xBE,0x80,0x80,0x80,
0x04,0x04,0x06,0x02,0x3F,0x3F,0x2B,0x2B,0x2a,0x2a,0x3e,0x3e,0x00,0x00,0x00,
/*------------------------------------------------------------------------------
; 源文件 / 文字 : 假
; 宽×高(像素): 15×16
------------------------------------------------------------------------------*/
0x20,0x30,0xFC,0xFF,0x03,0xFE,0xFE,0x92,0xBE,0xBE,0x92,0x92,0xBE,0xBE,0x00,
0x00,0x00,0x3F,0x3F,0x00,0x3F,0x3F,0x22,0x22,0x37,0x1F,0x1c,0x37,0x23,0x20,
/*------------------------------------------------------------------------------
; 源文件 / 文字 : 快
; 宽×高(像素): 15×16
------------------------------------------------------------------------------*/
0x60,0x30,0xFF,0xFF,0xB0,0xE8,0x88,0x88,0xFF,0xFF,0x88,0xF8,0xF8,0x80,0x80,
0x00,0x00,0x3F,0x3F,0x20,0x30,0x18,0x0e,0x07,0x07,0x0e,0x18,0x30,0x30,0x20,
/*------------------------------------------------------------------------------
; 源文件 / 文字 : 乐
; 宽×高(像素): 15×16
------------------------------------------------------------------------------*/
0x00,0x00,0x70,0x7E,0x4E,0x42,0x42,0xFA,0xFB,0x43,0x40,0x40,0x40,0x40,0x00,
0x00,0x10,0x18,0x0c,0x07,0x13,0x30,0x3F,0x1F,0x01,0x03,0x06,0x1e,0x18,0x00
};

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top