Introduction
This experiment demonstrates how to use the ATtiny85 as an I2C slave device to communicate with an I2C master (like an Arduino).
Materials Required
- ATtiny85 Microcontroller
- Arduino (Master device)
- Breadboard and jumper wires
- Resistor (4.7kΩ for pull-up on SDA and SCL)
- Arduino IDE with ATtiny85 support
- USBasp Programmer or similar
No Ads Available.
Circuit Diagram
The following diagram shows how to connect the ATtiny85 as an I2C slave device:
Steps for the Experiment
- Connect the ATtiny85 to the Arduino's SDA and SCL lines for I2C communication.
- Upload the slave program to the ATtiny85 using Arduino IDE.
- Upload the master program to the Arduino and observe communication between the two devices.
Explanation
In this experiment, the ATtiny85 acts as an I2C slave device, communicating with an Arduino master. The Arduino sends commands, and the ATtiny85 responds accordingly, demonstrating I2C communication.
Results and Observations
- The ATtiny85 should receive commands from the Arduino and respond as programmed.