I2C slave routines for the 87L - 免費(fèi)下載

單片機(jī)編程資源 文件大小:79 K

?? 資源詳細(xì)信息

文件格式
PDF
上傳用戶
上傳時(shí)間
文件大小
79 K
所需積分
2 積分
推薦指數(shù)
????? (5/5)

?? 溫馨提示:本資源由用戶 zjl2013 上傳分享,僅供學(xué)習(xí)交流使用。如有侵權(quán),請(qǐng)聯(lián)系我們刪除。

資源簡(jiǎn)介

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.

立即下載此資源

提示:下載后請(qǐng)用壓縮軟件解壓,推薦使用 WinRAR 或 7-Zip

資源說明

?? 下載說明

  • 下載需消耗 2積分
  • 24小時(shí)內(nèi)重復(fù)下載不扣分
  • 支持?jǐn)帱c(diǎn)續(xù)傳
  • 資源永久有效

?? 使用說明

  • 下載后用解壓軟件解壓
  • 推薦 WinRAR 或 7-Zip
  • 如有密碼請(qǐng)查看說明
  • 解壓后即可使用

?? 積分獲取

  • 上傳資源獲得積分
  • 每日簽到免費(fèi)領(lǐng)取
  • 邀請(qǐng)好友注冊(cè)獎(jiǎng)勵(lì)
  • 查看詳情 →

相關(guān)標(biāo)簽

點(diǎn)擊標(biāo)簽查看更多相關(guān)資源:

相關(guān)資源推薦