Built-in Functions
I2C module is being used.
Availability:
Requires:
Examples:
Example
Files:
Also See:
All devices.
#USE I2C
I2C_Speed (400000);
none
i2c_poll, i2c_start, i2c_stop, i2c_slaveaddr, i2c_isr_state, i 2 c_write, i 2 c_read,
#USE I2C, I2C Overview
i2c_start( )
Syntax:
i 2 c_start()
i 2 c_start( stream )
i 2 c_start( stream , restart)
Parameters: stream: specify the stream defined in #USE I 2 C
restart : 2 – new restart is forced instead of start
1 – normal start is performed
0 (or not specified) – restart is done only if the compiler last encountered a
I 2 C_START and no I 2 C_STOP
Returns:
Function:
undefined
Issues a start condition when in the I 2 C master mode. After the start condition the
clock is held low until I2C_WRITE() is called. If another I 2 C_start is called in the
same function before an i 2 c_stop is called, then a special restart condition is
issued. Note that specific I 2 C protocol depends on the slave device. The
I2C_START function will now accept an optional parameter. If 1 the compiler
assumes the bus is in the stopped state. If 2 the compiler treats this I2C_START
as a restart. If no parameter is passed a 2 is used only if the compiler compiled a
I2C_START last with no I2C_STOP since.
Availability: All devices.
Requires:
#USE I2C
Examples:
i2c_start();
i2c_write(0xa0);
i2c_write(address);
i2c_start();
i2c_write(0xa1);
//
//
//
//
Device address
Data to device
Restart
to change data direction
189
相关PDF资料
PCI-EXP-T42G5-N1 IP CORE PCI EXPRESS ORCA 4
PCM18XH2 PROCESSOR MODULE MPLAB-ICE 2000
PCM18XN0 PROCESSOR MODULE FOR ICE2000
PDA-B-24-615-E-2B1-1-C CIRCUIT BREAKER MAG 1P 15A
PFMF.260.2 PFMF PTC FUSE SMT 2.6A 1812
PFNF.200.2 PFNF PTC FUSE SMT 2A 1206
PFRY.375 PTC-FUSE RADIAL 72 VDC
PFSM.150.33.2 FUSE PTC 8A 15V FST-TRIP SMD
相关代理商/技术参数
PCD_09 制造商:MACOM 制造商全称:Tyco Electronics 功能描述:Low Profile PCB Relay PCD
PCD-00173-0C 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00173-0E 制造商:Molex 功能描述:Ethernet Cable Assembly
PCD-00173-0H 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00173-0K 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00174-0C 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY; Cable Length - Imperial:3ft; Cable Length - Metric:914.4mm; Connector Type A:RJ45 Plug; Connector Type B:RJ45 Plug; Jacket Color:Red; Approval Bodies:CSA / UL; Body Material:PVC; Cable Assembly Type:Ethernet ;RoHS Compliant: NA
PCD-00174-0E 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY; Cable Length - Imperial:3ft; Cable Length - Metric:914.4mm; Connector Type A:RJ45 Plug; Connector Type B:RJ45 Plug; Jacket Color:Grey; Approval Bodies:CSA / UL; Body Material:PVC; Cable Assembly Type:Ethernet;RoHS Compliant: NA
PCD-00174-0H 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY