亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

蟲蟲首頁| 資源下載| 資源專輯| 精品軟件
登錄| 注冊(cè)

您現(xiàn)在的位置是:蟲蟲下載站 > 資源下載 > 單片機(jī)編程 > I2C slave routines for the 87L

I2C slave routines for the 87L

  • 資源大小:79 K
  • 上傳時(shí)間: 2013-11-19
  • 上傳用戶:zjl2013
  • 資源積分:2 下載積分
  • 標(biāo)      簽: routines slave I2C 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.

相 關(guān) 資 源

主站蜘蛛池模板: 合阳县| 小金县| 霸州市| 嘉黎县| 凉山| 柞水县| 泰安市| 伊宁县| 大城县| 孟村| 个旧市| 涪陵区| 胶州市| 綦江县| 寿光市| 潜山县| 乌拉特前旗| 望谟县| 晋江市| 天祝| 兴安盟| 遂川县| 托克托县| 烟台市| 临漳县| 克拉玛依市| 全南县| 井研县| 米易县| 长岭县| 兴山县| 冀州市| 宁津县| 永顺县| 施秉县| 安远县| 苏州市| 云和县| 寻甸| 酒泉市| 常山县|