电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

C8051FSPI模块的应用举例

C8051FSPI模块的应用举例_第1页
1/28
C8051FSPI模块的应用举例_第2页
2/28
C8051FSPI模块的应用举例_第3页
3/28
Rev. 1.1 12/03Copyright © 2003 by Silicon LaboratoriesAN128-DS11AN128SOFTWARE SPI EXAMPLES FOR THE C8051F30X FAMILYRelevant DevicesThis application note applies to the following devices:C8051F300, C8051F301, C8051F302, and C8051F303.IntroductionThis application note is a collection of routines thatcan be used to implement a master-mode SPIdevice in software. Eight different examples of aSPI master-mode transfer are provided. The exam-ples contain two functions for each of the SPI clockphase and polarity options: an example written in‘C’, and for increased speed, an assembly routinethat can be called from ‘C’. An example of how tocall the routines from a ‘C’ program and anEEPROM interface example are also provided. SPIis a trademark of Motorola Inc.The SPI functions described in this document arewritten to minimize the software overhead requiredfor the SPI transaction. They are intended for use ina system where the C8051F30x device is the onlySPI master on the bus.Hardware InterfaceThese examples implement the SPI interface usingthree GPIO pins for transactions:MOSI (Master Out / Slave In): This pin is used forserial data output from the C8051F30x, and shouldbe configured as a digital push-pull output.MISO (Master In / Slave Out): This pin is used forserial data input from the slave device, and shouldbe configured as an open-drain digital pin.SCK (Serial Clock): This pin is used as the serialdata clock output from the C8051F30x device, andshould be configured as a digital push-pull output.Additionally, if a slave select signal is required forthe slave device, a fourth GPIO pin is needed, andmust be declared as a digital push-pull output forthis purpose. All of the dedicated GPIO pins shouldbe skipped by th...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

C8051FSPI模块的应用举例

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部