項目名稱:超聲波測距接收部分程序 功 能: 晶振采用12M,引腳定義:P0.1(SDA),P0.2(scl),P3.2(即INT0,紅外輸入),P3.3(即INT1,超聲波輸入) 硬件環境: 自制單片機實驗板, 軟件環境: Windows操作系統 使用軟件:偉福 V3.20, Easy 51Pro v2.0
上傳時間: 2014-01-24
上傳用戶:lxm
This example demonstrates how the C8051F06x SMBus interface can communicate // with a 256 byte I2C Serial EEPROM (Microchip 24LC02B). // - Interrupt-driven SMBus implementation // - Only master states defined (no slave or arbitration) // - Timer4 used by SMBus for scl low timeout detection // - scl frequency defined by <SMB_FREQUENCY> constant
標簽: demonstrates communicate C8051F06x interface
上傳時間: 2016-04-12
上傳用戶:hanli8870
I2C總線是常用的并行通訊方法,這是我在實際使用中經常套用的I2C函數,SDA和scl函數已經非常精煉
上傳時間: 2013-12-22
上傳用戶:sz_hjbf
x1288讀寫時序 0xDE 寫ccr陣列, 0xDF 讀ccr陣列 //0xAE 寫eeprom陣列,0xAF 讀eeprom陣列 (0x0000---0x1FF)共512個字節 //P5.7--scl BIT7 //P5.6--SDA BIT6
上傳時間: 2014-01-06
上傳用戶:我們的船長
在微機上模擬I2C總線的設計中,用并行口的D0(PIN2)模擬scl信號,用D1(PIN3)模擬SDA信號。
上傳時間: 2014-11-23
上傳用戶:zsjzc
用單片機的I/O口模擬I2C協議 I2C用IO模擬程序網上范例最多的就是51的程序了,這些范例的正確性無需懷疑.但是如果直接以它為藍本將它"AVR化",一不留神,就會有點問題了. 這要從I2C的硬件規范和AVR及51單片機的IO口說起.I2C要求scl,SDA二線都有 線與 功能,即I2C驅動口應該是 漏極開路 電路,其高電平的維持是靠上拉電阻來實現的, 而低電平則需要驅動口的強下拉能力. 51單片機IO口正好完全符合這個特性.寫起I2C驅動頗為得心應手.但是AVR的IO口強大了,它輸出的高電平是實實在在的高電平,而不是靠什么上拉電阻來提供,只有10mA都不到的電流!于是如果直接使用 PORTB_Bit0 = 1這樣的操作,就不能滿足I2C的線與功能了,如果此時有別的設備要將scl或者SDA拉低,那么結果就是二個IO口打架,誰贏誰輸不得而知,時間長了,多半是兩敗俱傷,芯片發熱吧. 當然AVR的IO口自然有辦法滿足I2C的電氣特性要求,不就是不能輸出1么,那么用它的高阻狀態即可(DDRB_Bit0=0,PORTB_Bit0=0即可),要輸出0么(DDRB_Bit0=1,PORTB_Bit0=0).
上傳時間: 2016-07-19
上傳用戶:gxrui1991
CH452的2線接口,不含按鍵中斷為2個I/O引腳,含按鍵中斷為3個I/O,兼容I2C/IIC時序 對于頻率低于24MHz的MCS51,為了節約傳輸時間,可以適當減少scl/SDA之間的延時
上傳時間: 2016-08-27
上傳用戶:Divine
通用的24C02/4/8的C語言程序,使用時需要自己重新定義SDA、scl及所使用的芯片
上傳時間: 2013-12-17
上傳用戶:腳趾頭
這個是實時時鐘芯片DS1302的驅動程序,采用c51編寫,編程時只需要修改一下scl,IO,RST的引腳定義即可,經過測試,完全好用
上傳時間: 2014-05-29
上傳用戶:JasonC
The Inter IC bus or I2C bus is a simple bidirectional two wire bus designed primarily for general control and data transfer communication between ICs. Some of the features of the I2C bus are: • Two signal lines, a serial data line (SDA) and a serial clock line (scl), and ground are required. A 12V supply line (500mA max.) for powering the peripherals often may be present. • Each device connected to the bus is software addressable by a unique address and simple master/ slave relationships exist at all times masters can operate as master-transmitters or as master-receivers. • The I2C bus is a true multi-master bus including collision detection and arbitration to prevent data corruption if two or more masters simultaneously initiate data transfer systems. • Serial, 8-bit oriented, bidirectional data transfers can be made at up to 100 KBit/s in the standard mode or up to 400 KBit/s in the fast mode.
標簽: bus bidirectional primarily designed
上傳時間: 2013-12-11
上傳用戶:jeffery