i2c_hw_slave

i2c_hardware slave procedures

Author Sebastien Lelong, Copyright © 2008-2009, all rights reserved.
Adapted-by Joep Suijs, Albert Faber
Compiler >=2.4i

Description

Common and useful functions and procedure to implement an I2C slave


Dependencies

No dependency found



Summary

Global variables/contants

Procedures

Functions


API details

Global variables/contants

Procedures

  • i2c_hw_slave_init(byte in height_bits_icaddress)

    setup an i2c slave, with low address (not high addresses coded with 10-bits)
    The passed address must be 8-bits long: it's a 7-bits address + the 8th R/W bit
    A global "i2c_enable_start_stop_interrupts" constant can be defined to so
    interrupts are generated on Start/Stop signals.
    /!\ careful: calling this procedure will enable interrupts (global, peripherals and i2c)
    

  • i2c_hw_slave_write_i2c(byte in what)

    write a byte to i2c bus
    

Functions


Related samples

Here are the list of samples which use this library:

16f72316f723_i2c_hw_slave_check_bus.jal
16f72316f723_i2c_hw_slave_echo.jal
16f7316f73_i2c_hw_slave_echo.jal
16f7316f73_i2c_hw_slave_check_bus.jal
16f87716f877_i2c_hw_slave_check_bus.jal
16f87716f877_i2c_hw_slave_echo.jal
16f877a16f877a_servo_rc_master_dedicated_slave_i2c.jal
16f877a16f877a_i2c_hw_slave_check_bus.jal
16f877a16f877a_i2c_hw_slave_echo.jal
16f8816f88_i2c_hw_slave_check_bus.jal
16f8816f88_i2c_hw_slave_echo.jal
18f14k5018f14k50_i2c_hw_slave_echo.jal
18f14k5018f14k50_i2c_hw_slave_check_bus.jal
18f252018f2520_i2c_hw_slave_check_bus.jal
18f252018f2520_i2c_hw_slave_echo.jal
18f255018f2550_i2c_hw_slave_check_bus.jal
18f255018f2550_i2c_hw_slave_echo.jal
18f262018f2620_i2c_hw_slave_echo.jal
18f262018f2620_i2c_hw_slave_check_bus.jal
18f45218f452_i2c_hw_slave_check_bus.jal
18f45218f452_i2c_hw_slave_echo.jal
18f45218f452_servo_rc_master_dedicated_slave_i2c.jal
18f455018f4550_i2c_hw_slave_check_bus.jal
18f455018f4550_i2c_hw_slave_echo.jal
18f462018f4620_servo_rc_master_dedicated_slave_i2c.jal
18f462018f4620_i2c_hw_slave_check_bus.jal
18f462018f4620_i2c_hw_slave_echo.jal
18f67j5018f67j50_i2c_hw_slave_echo.jal
18f67j5018f67j50_i2c_hw_slave_check_bus.jal