欢迎来到虫虫开发者社区 — 百万工程师技术资源

I2C slave routines for the 87L

单片机编程 79 K 147 次下载

资源详细信息

文件格式
PDF
文件大小
79 K
资源分类
上传者
发布时间
下载统计
147
所需积分
2 积分

I2C slave routines for the 87L - 资源详细说明

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.

立即下载 I2C slave routines for the 87L

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

下载说明与使用指南

下载说明

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

使用说明

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

积分获取方式

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

相关技术标签

点击标签浏览更多相关单片机编程资源:

相关单片机编程资源推荐