I2C slave routines for the 87L - 免费下载

单片机编程资源 文件大小:79 K

📋 资源详细信息

文件格式
PDF
所属分类
上传用户
上传时间
文件大小
79 K
所需积分
2 积分
推荐指数
⭐⭐⭐⭐⭐ (5/5)

💡 温馨提示:本资源由用户 zjl2013 上传分享,仅供学习交流使用。如有侵权,请联系我们删除。

资源简介

The 87LPC76X Microcontroller combines in a small package the
benefits of a high-performance microcontroller with on-board
hardware supporting the Inter-Integrated Circuit (I2C) bus interface.
The 87LPC76X can be programmed both as an I2C bus master, a
slave, or both. An overview of the I2C bus and description of the bus
support hardware in the 87LPC76X microcontrollers appears in
application note AN464, Using the 87LPC76X Microcontroller as an
I2C Bus Master. That application note includes a programming
example, demonstrating a bus-master code. Here we show an
example of programming the microcontroller as an I2C slave.
The code listing demonstrates communications routines for the
87LPC76X as a slave on the I2C bus. It compliments the program in
AN464 which demonstrates the 87LPC76X as an I2C bus master.
One may demonstrate two 87LPC76X devices communicating with
each other on the I2C bus, using the AN464 code in one, and the
program presented here in the other. The examples presented here
and in AN464 allow the 87LPC76X to be either a master or a slave,
but not both. Switching between master and slave roles in a
multimaster environment is described in application note AN435.
The software for a slave on the bus is relatively simple, as the
processor plays a relatively passive role. It does not initiate bus
transfers on its own, but responds to a master initiating the
communications. This is true whether the slave receives or transmits
data—transmission takes place only as a response to a bus
master’s request. The slave does not have to worry about arbitration
or about devices which do not acknowledge their address. As the
slave is not supposed to take control of the bus, we do not demand
it to resolve bus exceptions or “hangups”. If the bus becomes
inactive the processor simply withdraws, not interfering with the
master (or masters) on the bus which should (hopefully) try to
resolve the situation.

立即下载此资源

提示:下载后请用压缩软件解压,推荐使用 WinRAR 或 7-Zip

资源说明

📥 下载说明

  • 下载需消耗 2积分
  • 24小时内重复下载不扣分
  • 支持断点续传
  • 资源永久有效

📦 使用说明

  • 下载后用解压软件解压
  • 推荐 WinRAR 或 7-Zip
  • 如有密码请查看说明
  • 解压后即可使用

🎁 积分获取

  • 上传资源获得积分
  • 每日签到免费领取
  • 邀请好友注册奖励
  • 查看详情 →

相关标签

点击标签查看更多相关资源:

相关资源推荐