[an error occurred while processing this directive]
|
The project soft_i2c is emulating an I2C bus interface for 8-Bit addressing,
using two standard I/O ports:
SDA - port 34 (HRQ)
SCL - port 35 (HAK)
Note:
Clock synchronisation mechanisms and arbitration procedures are not considered
within here. The example has been used to communicate with an M24C08. Memory
acceses are restricted to 8-bit addresses. The device slave address can be
changed with a define instruction.
Implemented functions:
I2C_Start - generate start condition
I2C_Stop - generate stop condition
I2C_Read_Byte - read byte from I2C memory
I2C_Write_Byte - write byte to I2C memory
I2C_Read_Ack - read Acknowledge from I2C bus device
I2C-Write_Device - complete sequence to write a byte to I2C memory address
I2C_Read_Device - complete sequence to read a byte from I2C memory address
Note:
For no high speed I2C devices, it would be necessary to add some further
wait states within these functions to ensure the proper timing.
E-mail: info@telesys.ru