久久ER99热精品一区二区-久久精品99国产精品日本-久久精品免费一区二区三区-久久综合九色综合欧美狠狠

新聞中心

EEPW首頁 > 嵌入式系統 > 設計應用 > 52控制12864的串口程序

52控制12864的串口程序

作者: 時間:2016-11-18 來源:網絡 收藏
#include

#include
#include
#define uint unsigned int
#define uchar unsigned char
//====================================================================
//函數聲明
void Delay(uint ms); //延時子程序
void W_1byte(uchar RW, uchar RS, uchar W_data);
void Write_8bits(uint W_bits);
void LCD_Init(void);

本文引用地址:http://cqxgywz.com/article/201611/315784.htm

sbit CS=P3^5; //CS=RS
sbit SID=P3^6; //RW=SID
sbit SCLK=P3^7; //E=SCLK
sbit PSB=P2^3; //E=SCLK
//===================================================================
code uchar mynew1[]={"天津工程師范學院"};
code uchar mynew2[]={"電子工程學院"};
code uchar mynew3[]={"應電0813班趙宏杰"};
code uchar mynew4[]={"電話:15922073007"};

void main()
{
uchar i=0;
SP = 0X60;
CS = 0;
SCLK = 0;
SID = 0;
PSB=0;
LCD_Init();
while(1)
{
W_1byte(0,0,0x80);
_nop_();
for(i=0;mynew1[i]!=