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
- 下一篇: 人工智能 | 自动驾驶与人工智能前沿研究