Altera_Forum
Honored Contributor
10 years agoI2C package
Hello I need help with programming universal I2C interface. I need to do I2C commands for various operations . Such as address, write, read , and stop bit . Such operations have defined somewhere in the package and use only. Can I use procedure?
procedure I2C_address(address:in unsigned(6 downto 0); RW:in std_logic); procedure I2C_write(data_out:in unsigned(7 downto 0)); procedure I2C_read(data_in:out unsigned(7 downto 0)); procedure I2C_stop(); This procedures I need use my projects... Can I embed the process into a procedure ? Somewhere package with I2C ? Thanks