51单片机驱动LCD12864a(不带字库型)
#include <reg51.h>
#define uchar unsigned char
#define uint unsigned int
#define LcdData P2
sbit LCD12864_RS = P0^0;
sbit LCD12864_RW = P0^1;
sbit LCD12864_EN = P0^2;
sbit LCD12864_CS1 = P0^3;
sbit LCD12864_CS2 = P0^4;
sbit LCD12864_RST = P0^5;
void Lcd_Init();
void Delay(uint k);
void Lcd_WriteCmd(uchar com);
void Lcd_WriteData(uchar dat);
void Lcd12864_Disp_Picture(uchar code *img);
void Lcd_Clear();
void main(void)
{
Lcd_Init();
Lcd_Clear();
while(1)
Lcd12864_Disp_Picture(bmp);
}.....
评论