Forum > Embedded - AVR

other version of i2cslave_unit.pas, to send backwards to Master



Does anybody have a variant of this unit to send bytes from this Slave to Master RPI ?

Greets, Wouter

You may have a better chance of getting helped if you explain why the demo does not meet the requirements for your I2C slave.

Also look at other slave devices to see how the master/slave data communication works. As an example of a complex slave device, consider the ICM-20948 motion sensor.  This sensor takes readings and perform many calculations per second to update information (orientation, speed, inclination etc.).  This information is stored in an internal buffer.  The master has to read this information from the sensor over I2C (or SPI, but the principle is still the same).  There is an optional interrupt pin on the slave that can be programmed to signal when some condition is met, for example when a new calculated value is available.  The principle remains that the slave device cannot initiate communication over I2C, but it can use another pin to signal that information is available for the master.  It is still the responsibility of the master to request data from the slave.


[0] Message Index

Go to full version