1

I'm new in this world of electronic developers and right now I am interfacing between one microcontroller, the ATtiny841 ATtiny841 Datasheet and I want to receive data from a HDC1080 temp/humidity sensor HDC1080 Datasheet, I was reading documentation about the I2C protocole and I saw that I need one master device to communicate with slave devices.

The problem is that the ATtiny841 says in the Datasheet that has only I2C slave interface, and the HDC1080 has the same condition. I found the libraries to use the I2C communication in both hardwares (ATtiny841 wireS library to I2C communication and HDC1080 library which is working with Arduino).

I want to know if is possible to communicate between this components, to get deeper inside this libraries, if the condition "slave only" has only software issues or need electronics to accomplish the job.

Please forgive my bad english, and I hope to receive help with this idea, regards.

Dave2e
  • 22,192
  • 18
  • 42
  • 50
fabocode
  • 62
  • 1
  • 13

1 Answers1

1

Possibly "slave-only" means that the ATtiny841 TWI cannot generate clock signal for the I2C/TWI bus.

This issue maybe can be solved by software but then I would recommend to bit-bang the whole I2C interface so you do not have to mix existing TWI hardware handling with additional software components but have everything under control by software.

Possibly you do not even have to write your own bit-banged I2C as there are already a couple of implementation. Here is one for example.

Bence Kaulics
  • 7,066
  • 7
  • 33
  • 63