C语言 | 基于MPU605(六轴传感器)的I2C实现LCD1602显示(代码类)
生活随笔
收集整理的這篇文章主要介紹了
C语言 | 基于MPU605(六轴传感器)的I2C实现LCD1602显示(代码类)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
博主github:https://github.com/MichaelBeechan
博主CSDN:https://blog.csdn.net/u011344545
基于MPU605(六軸傳感器)的I2C實現LCD1602顯示:
#include <REG52.H> #include <math.h> //Keil library #include <stdio.h> //Keil library #include <INTRINS.H>#define Busy 0x80 #define LCDdata P0 //typedef unsigned char uchar; typedef unsigned short ushort; //typedef unsigned int uint; #define uint unsigned int #define uchar unsigned char uchar seg0[]="X:"; uchar seg1[]="Y:"; //uchar seg2[]="Z:";//**************************************** // 定義51單片機端口 //**************************************** //#define DataPort P0 //LCD1602數據端口 sbit SCL=P1^0; //IIC時鐘引腳定義 sbit SDA=P1^1; //IIC數據引腳定義 /*sbit LCM_RS=P2^4; //LCD1602命令端口 sbit LCM_RW=P2^5; //LCD1602命令端口總結
以上是生活随笔為你收集整理的C语言 | 基于MPU605(六轴传感器)的I2C实现LCD1602显示(代码类)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 安装 | Windows 10下基于An
- 下一篇: 人工智能 | 自动驾驶与人工智能前沿研究