#include<reg51.h>
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include "absacc.h"
#include "intrins.h"
#include "string.h"
sbit sce=P2^1; //片选
sbit res=P2^0; //复位,0 复位
sbit dc=P1^6; //1 写数据,0 写指令
sbit sdin=P1^5; //数据
sbit sclk=P1^7; //时钟
sbit back_led =P3^7; //背光
void LCD_init(void);
void LCD_clear(void);
void LCD_write_String(unsigned char X,unsigned char Y,char *s);
void LCD_write_char(unsigned char c);
void LCD_write_byte(unsigned char dt,unsigned char command);
/************************************************************
*******************************************************************
******************************************************************/
//6x8.h 文件:
/*-----------------------------------------------
6 x 8 font
1 pixel space at left and bottom
index = ASCII - 32
-----------------------------------------------*/
unsigned char code font6x8[][6] =
{
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },// sp
{ 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00 },// !
{ 0x00, 0x00, 0x07, 0x00, 0x07, 0x00 },// "
{ 0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14 },// #
{ 0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12 },// $
{ 0x00, 0x62, 0x64, 0x08, 0x13, 0x23 },// %
{ 0x00, 0x36, 0x49, 0x55, 0x22, 0x50 },// &
{ 0x00, 0x00, 0x05, 0x03, 0x00, 0x00 },// '
{ 0x00, 0x00, 0x1c, 0x22, 0x41, 0x00 },// (
{ 0x00, 0x00, 0x41, 0x22, 0x1c, 0x00 },// )
{ 0x00, 0x14, 0x08, 0x3E, 0x08, 0x14 },// *
评论0
最新资源