[SOLVED] Communication between two ATMEGA32 using I2C

Status
Not open for further replies.

suhaila38

Newbie level 2
Joined
Apr 1, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
malaysia
Activity points
1,297
Hi all~

For the first stage, I have done I2C communication between two ATMEGA32.. I just simulated it using Proteus. Generally, I want to familiarize with I2C where MASTER will send the data "0x05" to the slave (address 0x20). The slave will compared the address that has been sent by the MASTER to the bus.If the address is equal, then it will show the same data (0x05) at PORT A by illuminates the LED.This is my circuit in Proteus...


SDA and SCL produce the correct output at the oscilloscope but at the wrong time interval. As what I have read, the data will be changed only when SCL= 0..


For the second stage, I've applied the same cct and the same coding onto the real hardware...Unfortunately, I didn't get any output at PORT A same as I got it in Proteus..the signal for SDA and SCL also didn't appeared.

I wanna help from the expert..please :-D

** coding for MASTER**


** coding for SLAVE**

// Program for Slave Mode
 

Since there is no reply, i managed to solve the problem by myself..

Guess what??

i think I've solved it !

the signals...


the circuit...
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…