欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 3511|回復(fù): 3
收起左側(cè)

51單片機(jī)LCD1602驅(qū)動(dòng)代碼 視頻 仿真

[復(fù)制鏈接]
ID:46381 發(fā)表于 2019-3-14 10:24 | 顯示全部樓層 |閱讀模式
#include "Config.h"        
#include <intrins.h>
sbit RS = P2^0;
sbit RW = P2^1;
sbit E= P2^2;
void LCD1602_delay_10us(unsigned char i)
{
        unsigned char j;
        while(i--)
        for(j=0;j<10; j++)
                ;
}
void LCD1602_delay_1ms(unsigned char i)
{
        unsigned char j;
        while(i--)
                ;
        for(j=0;j<125;j++)
                ;
}
void LCD1602_Write_Cmd(unsigned char cmd)
{
        LCD1602_delay_10us(5);
        E=0;
        RS=0;
        RW=0;
        LCD_PORT=cmd;
        LCD1602_delay_10us(5); //>40us
        E=1;
        LCD1602_delay_1ms(2); //>150us
        E=0;
        LCD1602_delay_10us(4); //>25+10us?
}
void LCD1602_Write_Dat(unsigned char dat)
{
        LCD1602_delay_10us(5);
        E=0;
        RS=1;
        RW=0;
        LCD_PORT = dat;
        LCD1602_delay_10us(5);
        E=1;
        LCD1602_delay_10us(5);
        E=0;
        LCD1602_delay_10us(4);
}
void LCD1602_Addr_x_y(unsigned char x,bit y)
{
        unsigned char temp=0x80;
        if(y)
        {
                temp|=0x40;
        }
        temp|=x;
        LCD1602_Write_Cmd(temp);
}
void LCD1602_Show_Char(unsigned char x,bit y,unsigned char p)
{
        LCD1602_Addr_x_y(x,y);
        LCD1602_Write_Dat(p);
}
void LCD1602_Show_String(unsigned char x,bit y,char *ptr,unsigned char data_len)
{
        unsigned char i;
        for (i=0;i<data_len;i++)
                {
                LCD1602_Show_Char(x++,y,*(ptr+i));
                }
}
void LCD1602_Init(void)
{
        LCD1602_delay_1ms(1500);
        LCD1602_Write_Cmd(0x38);
        LCD1602_delay_1ms(5);
        LCD1602_Write_Cmd(0x38);
        LCD1602_delay_1ms(5);
        LCD1602_Write_Cmd(0x38);
        LCD1602_delay_1ms(5);
        LCD1602_Write_Cmd(0x38);
        LCD1602_Write_Cmd(0x08);
        LCD1602_Write_Cmd(0x06);
        LCD1602_Write_Cmd(0x0c);
        LCD1602_Write_Cmd(0x01);
}
實(shí)錄視頻連接
鏈接:https://pan.baidu.com/s/1c1lEja-Kx6IEvJIS74ZpPQ
提取碼:m66j
復(fù)制這段內(nèi)容后打開百度網(wǎng)盤手機(jī)App,操作更方便哦

仿真電路圖

仿真電路圖

評(píng)分

參與人數(shù) 1黑幣 +50 收起 理由
admin + 50 共享資料的黑幣獎(jiǎng)勵(lì)!

查看全部評(píng)分

回復(fù)

使用道具 舉報(bào)

ID:520954 發(fā)表于 2019-4-24 23:04 來自觸屏版 | 顯示全部樓層
這是輸出什么的
回復(fù)

使用道具 舉報(bào)

ID:516331 發(fā)表于 2019-4-19 15:01 | 顯示全部樓層
好資料,大佬
回復(fù)

使用道具 舉報(bào)

ID:47652 發(fā)表于 2019-4-18 20:21 | 顯示全部樓層
好資料,收藏了,
回復(fù)

使用道具 舉報(bào)

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表