毕业论文

打赏
当前位置: 毕业论文 > 自动化 >

基于8051单片机的I2C和SPI总线仿真

时间:2018-04-12 22:54来源:毕业论文
在8051等没有I2C和SPI接口的单片机上,实现I2C和SPI接口功能。所开发的I2C和SPI接口程序模块要能够使用方便。此外利用Proteus软件仿真I2C和SPI总线。结合24C02芯片和TC72芯片设计一个温度控制

摘要:现今,在低端数字通信应用领域,我们随处可见I2C (Inter-Integrated Circuit) 和 SPI (Serial Peripheral Interface)的身影。原因是这两种通信协议非常适合近距离低速芯片间通信。Philips(for I2C)和Motorola(for SPI) 出于不同背景和市场需求制定了这两种标准通信协议。
本课题我使用基于8051单片机系统,利用8位通用微处理器AT89C52的简便和相对大的容量以及8个中断源。AT89C52除了有AT89C51所有的定时/计数器0 和定时/计数器1 外,还增加了一个定时/计数器2。在8051等没有I2C和SPI接口的单片机上,实现I2C和SPI接口功能。所开发的I2C和SPI接口程序模块要能够使用方便。此外利用Proteus软件仿真I2C和SPI总线。结合24C02芯片和TC72芯片设计一个温度控制系统,当你输入什么温度时,显示器显示什么温度,表示程序运行成功。程序利用C语言编写利用软件Keil,再与Proteus联合最终在其软件中成功的模拟运行。21058
毕业论文关键词:    I2C;SPI;8051单片机;通信协议;接口
The Simulation of I2C and SPI Bus Based on the 8051 MCU
Abstract:     Nowadays, in the field of low-end digital communication applications, we see I2C(Inter-Integrated Circuit) and SPI (Serial Peripheral Interface) figure. The reason for this is that this two kinds of communication protocol is very suitable for short distance low inter chip communication. Philips (for I2C) and Motorola (for SPI)with different background and market demand to develop the two standard communication protocol.
  I use system based on 8051 single chip, using simple 8 bit microprocessor AT89C52 and relatively large capacity and 8 interrupt sources.AT89C52 in addition to AT89C51 all the timer / counter 0 and timer / counter 1,also added a timer / counter 2. In 8051, no I2C and SPI interface chip, I2Cfunction and SPI interface. I2C and SPI interface program module are developed to be able to use convenient. In addition, by using the software of Proteus I2C and SPI bus. Combined with the 24C02 chip and TC72 chip to design a temperature control system, when you enter what temperature, display what temperature, said the program runs successfully. Program using C language using the software Keil, simulation run and then combined with Proteus software in the final success.
Keywords:     I2C;SPI;8051MCU;communication protocols; interface
目录
摘要    i
Abstract    ii
目录    iii
1    绪论    1
1.1    课题背景    1
1.1.1    课题开发意义    2
1.1.2  课题国内外现状    9
2    程序    13
2.1    程序实现    13
3    系统    18
3.1    验证系统所使用的芯片    18
3.2    验证电路     22
3.3    验证方法    25
4    结论    27
4.1    程序运行结果    27
4.2    程序最终效果演示    27
5    结束语    28
致谢    29
参考文献    30s
1    绪论
1.1    课题背景
I2C总线开发于1982年,当时是为了给点实际内的CPU和外围芯片提供更简易的互联方式。电视机是最早的嵌入式系统之一,而最初的嵌入式是使用内存映射(memory-mapped I/O)的方式来互联微控制器和外围设备的。要实现内存映射,设备必须并联入微控制器的数据线和地址线,这种方式在连接多个外设时需大量线路和额外地址解码芯片,很不方便冰洁成本高。为了节省微控制器的引脚和额外的逻辑芯片,使印刷电路更简单,成本更低,位于荷兰的Philips实验室开发了‘Inter-Integrated Circuit’,I2C,一种只使用两根线连接所有外围芯片的总线协议。最初的标准定义总线速度为100Kps,经历几次修改,主要是1995年的400Kbps,,1998年的3.4Mbps。 基于8051单片机的I2C和SPI总线仿真:http://www.751com.cn/zidonghua/lunwen_13089.html
------分隔线----------------------------
推荐内容