i2c通讯实现.doc
约17页DOC格式手机打开展开
i2c通讯实现,i2c通讯实现1.2万字 16页摘要i2c总线是philips公司开发的一种简单、双向、二线制、同步串行总线。它只需两根线(串行时钟线和串行数据线)即可在连接于总线上的器件之间传送信息。该总线是高性能串行总线,具备多主机系统所需要的裁决和高低速设备同步等功能,应用极为广泛。目前,单片机应用系统的外围扩展已从并行方式为主...
内容介绍
此文档由会员 xiaowei 发布
I2C通讯实现
1.2万字 16页
摘要 I2C总线是PHILIPS公司开发的一种简单、双向、二线制、同步串行总线。它只需两根线(串行时钟线和串行数据线)即可在连接于总线上的器件之间传送信息。该总线是高性能串行总线,具备多主机系统所需要的裁决和高低速设备同步等功能,应用极为广泛。目前,单片机应用系统的外围扩展已从并行方式为主过渡到以串行方式为主的时代。许多新型外围器件都带有串行扩展接口。通常的串行扩展接口和串行扩展总线有UART的移位寄存器方式、MOTOROLA公司的SPI、NS公司的Microwire、Dallas公司的1Wire和Philips公司的I2C总线等。其中,I2C总线提供了较完善的总线协议、最简单的串行连接方式.
I2C总线是1个十分完善的多主系统总线,总线上可以挂接多个MCU,因此有4种工作方式,即主发送、主接收、从发送、从接收。但实际的单片机应用系统绝大多数都是单个MCU系统,只用到I2C总线的主方式,即主发送与主接收.
本文主要讨论的是通过I2C总线实现X25045 EEPROM与80C51 系列单片之间的通讯
关键词 I2C总线,写允许,写数据,读状态寄存器,写状态寄存器,操作码,80C51,X25045
I2C Bus Information Transport
Abstract ` The I2C bus is a PHILIPS company development of a simple, double direction, two wire systems, synchronous string line bus .It only needs two radix wire( string line clock wire and the string line data wire) then in the connectivity among the bus parts of an apparatus piece transport information. That bus is a verdict for bus , having the many of host system needing of a line with the synchronous etc. function of high low speed equipment, application extremely extensive. Now, the outer circle that single slab machine apply the system expand already from proceed together the mode to transfer for lord with the string ages for line method is mainly. Much new peripheral equipment the piece all take to have a line to expand to connect the orifice. Usually of string the line expand to connect the orifice with the string the line expand to bus contain moving register method of UART , MOTOROLA 's SPI ,NS' Microwire, Dallas' one Wire and Philips company's I2C bus etc. Among them, the I2C bus provided the perfect bus protocol, most simple of string line connectivity method......
目 录
摘要………………………………………………………………………………….….…1
1 背景…………………………………………………………………………………….2
2.1 I2C总线………………………………………………………………………………2
1. I2C总线介绍……………………………………………………………………………………...2
2 . I2C总线数据传输规范…………………………………………………………………………..3
2.2 80C51系列单片机…………………………………………………………………..3
2.3 X2504EEPROM芯片………………………………………………………………...5
1. X2504EEPROM芯片介绍……………………………………………………….5
2. 芯片内部指令…………………………………………………………………….7
3. 特征……………………………………………………………………………….8
3. 编程与实现……………………………………………………………………………9
1. 80C51头文件定义………………………………………………………………..9
2. X25045的实现方法………………………………………………………………12
3. 实现…………………………………………………………………………….…14
4. 实验体会………………………………………………………………………………18
5. 总结……………………………………………………………………………………18
参考文献………………………………………………………………………………...…18
参考文献:
① 谭浩强 编著 重庆大学出版社
② 张志明 杨明广 主编 <汇编语言程序设计> 重庆大学出版社
1.2万字 16页
摘要 I2C总线是PHILIPS公司开发的一种简单、双向、二线制、同步串行总线。它只需两根线(串行时钟线和串行数据线)即可在连接于总线上的器件之间传送信息。该总线是高性能串行总线,具备多主机系统所需要的裁决和高低速设备同步等功能,应用极为广泛。目前,单片机应用系统的外围扩展已从并行方式为主过渡到以串行方式为主的时代。许多新型外围器件都带有串行扩展接口。通常的串行扩展接口和串行扩展总线有UART的移位寄存器方式、MOTOROLA公司的SPI、NS公司的Microwire、Dallas公司的1Wire和Philips公司的I2C总线等。其中,I2C总线提供了较完善的总线协议、最简单的串行连接方式.
I2C总线是1个十分完善的多主系统总线,总线上可以挂接多个MCU,因此有4种工作方式,即主发送、主接收、从发送、从接收。但实际的单片机应用系统绝大多数都是单个MCU系统,只用到I2C总线的主方式,即主发送与主接收.
本文主要讨论的是通过I2C总线实现X25045 EEPROM与80C51 系列单片之间的通讯
关键词 I2C总线,写允许,写数据,读状态寄存器,写状态寄存器,操作码,80C51,X25045
I2C Bus Information Transport
Abstract ` The I2C bus is a PHILIPS company development of a simple, double direction, two wire systems, synchronous string line bus .It only needs two radix wire( string line clock wire and the string line data wire) then in the connectivity among the bus parts of an apparatus piece transport information. That bus is a verdict for bus , having the many of host system needing of a line with the synchronous etc. function of high low speed equipment, application extremely extensive. Now, the outer circle that single slab machine apply the system expand already from proceed together the mode to transfer for lord with the string ages for line method is mainly. Much new peripheral equipment the piece all take to have a line to expand to connect the orifice. Usually of string the line expand to connect the orifice with the string the line expand to bus contain moving register method of UART , MOTOROLA 's SPI ,NS' Microwire, Dallas' one Wire and Philips company's I2C bus etc. Among them, the I2C bus provided the perfect bus protocol, most simple of string line connectivity method......
目 录
摘要………………………………………………………………………………….….…1
1 背景…………………………………………………………………………………….2
2.1 I2C总线………………………………………………………………………………2
1. I2C总线介绍……………………………………………………………………………………...2
2 . I2C总线数据传输规范…………………………………………………………………………..3
2.2 80C51系列单片机…………………………………………………………………..3
2.3 X2504EEPROM芯片………………………………………………………………...5
1. X2504EEPROM芯片介绍……………………………………………………….5
2. 芯片内部指令…………………………………………………………………….7
3. 特征……………………………………………………………………………….8
3. 编程与实现……………………………………………………………………………9
1. 80C51头文件定义………………………………………………………………..9
2. X25045的实现方法………………………………………………………………12
3. 实现…………………………………………………………………………….…14
4. 实验体会………………………………………………………………………………18
5. 总结……………………………………………………………………………………18
参考文献………………………………………………………………………………...…18
参考文献:
① 谭浩强 编著
② 张志明 杨明广 主编 <汇编语言程序设计> 重庆大学出版社