Author | Stef Mientki, Copyright © 2005..2024, all rights reserved. |
Adapted-by | Joep Suijs, Albert Faber, Rob Jansen |
Compiler | 2.5r8 |
Hardware implementation of I2C (single) master.
No dependency found
const _i2c_slowest = 127
const _i2c_100khz = target_clock / 100_000 / 4 - 1
const _i2c_1mhz = target_clock / 1_000_000 / 4 - 1
const _i2c_400khz = target_clock / 400_000 / 4 - 1
const _i2c_slowest = 127
Some constants needed for the baudrate generator. Can be overruled by I2C_USER_BUS_SPEED.
const _i2c_100khz = target_clock / 100_000 / 4 - 1
(default)
const _i2c_1mhz = target_clock / 1_000_000 / 4 - 1
No documentation found
const _i2c_400khz = target_clock / 400_000 / 4 - 1
No documentation found
i2c_restart()
i2c_restart - Sends Restart bit and waits until finished or timeout (if defined)
i2c_initialize()
if the device has changed, change the speed if necessary
i2c_stop()
i2c_stop - Sends Stop bit and waits until finished or timeout (if defined)
i2c_start()
i2c_start - Sends Start bit and waits until finished or timeout (if defined)
i2c_receive_byte(bit in ACK ) return byte
i2c_receive_byte - start receiving of a byte and waits till finished or timeout (if defined) if param ACK is true, the byte is acknowledged and next bytes can be received. if param ACK is false, the byte is nacked and a stop *should be* sent. note: this behavior is inverted from the line level and orignal library, but consistent with the i2c_software library.
i2c_transmit_byte(byte in data) return bit
i2c_transmit_byte. Returns TRUE when OK and FALSE in case of an error or when a timeout occurs (if defined)
16f1823 | 16f1823_i2c_hw_eeprom_serial.jal |
16f1825 | 16f1825_as5600l.jal |
16f1825 | 16f1825_mcp23008.jal |
16f1825 | 16f1825_rda5807m.jal |
16f1825 | 16f1825_bmp180.jal |
16f1825 | 16f1825_rtc_ds3231.jal |
16f877 | 16f877_i2c_hw_l0.jal |
16f877 | 16f877_i2c_hw_l1.jal |
16f877a | 16f877a_i2c_hw_l0.jal |
16f877a | 16f877a_rtc_pcf8563.jal |
16f877a | 16f877a_ds1307_hw.jal |
16f877a | 16f877a_i2c_hw_l1.jal |
18f14k50 | 18f14k50_i2c_hw_l1.jal |
18f14k50 | 18f14k50_i2c_hw_l0.jal |
18f2520 | 18f2520_i2c_hw_l0.jal |
18f2520 | 18f2520_i2c_hw_l1.jal |
18f2550 | 18f2550_i2c_hw_l0.jal |
18f2550 | 18f2550_i2c_hw_l1.jal |
18f25k22 | 18f25k22_i2c_hw_master_echo.jal |
18f2620 | 18f2620_i2c_hw_l0.jal |
18f2620 | 18f2620_i2c_hw_l1.jal |
18f452 | 18f452_i2c_hw_l1.jal |
18f452 | 18f452_i2c_hw_l0.jal |
18f4550 | 18f4550_i2c_hw_l1.jal |
18f4550 | 18f4550_i2c_hw_l0.jal |
18f4620 | 18f4620_i2c_hw_l0.jal |
18f4620 | 18f4620_i2c_hw_l1.jal |
18f67j50 | 18f67j50_i2c_hw_l1.jal |
18f67j50 | 18f67j50_i2c_hw_l0.jal |
18f67k22 | 18f67k22_co2_i2c.jal |