Discussion in "8051 Discussion Forum" started by    haihodanang    Nov 29, 2008.
Sat Nov 29 2008, 12:33 AM
#1
I am trying to simulating i2c interface between 89c51 and 24c04.But i am not sucessful.This is my program .I don't know what mistake can be in my program.in this program, I intend to write data restored in address 1Ah of 89c51 to 24c51.R7 register restore word address to write. then I read the data from 24c04 .To check process,I use 7segs to perform the result i read.


[ Edited Sat Nov 29 2008, 12:44 AM ]
Sat Nov 29 2008, 03:46 AM
#2
Only certain file types are allowed for uploading.Make sure you comply and attach the code again.Or else just copy-paste the code here.

Allowed file types: | .zip | .gz | .jpg | .png | .gif | .rar | .pdf |
Any other file types uploaded will be instantly deleted.



[ Edited Sat Nov 29 2008, 03:48 AM ]
Sun Nov 30 2008, 09:55 AM
#3
help me as soon as possible!thank you very much
Attachment
Sun Nov 30 2008, 07:56 PM
#4
are you checking on simulator or on hardware?

and your delay seems little less than the required one. your delay must be more than 5ms, try with 10ms delay and see if it works.

I am considering that your I2C routines are working fine. To check your routines are fine or not, use software called PINNACLE. its good for checking software I2C.
you can download trial version here:
http://www.vaultbbs.com/pinnacle/
Tue Dec 02 2008, 02:01 AM
#5
can you show me the way to simulate in this software.
Tue Dec 02 2008, 08:57 AM
#6
hmm its hard to explain like this..
i will try to take screenshots in evening to explain u..
Wed Dec 03 2008, 08:59 AM
#7
Sorry for the complaint yesterday.I wasnot calm. dealine is coming, so I am so worried:blush!Now,can I ask you a question .After eeprom get 1 byte from 89c51 ,it will pull down sda.what does this process happen ?In your code, after send 1 byte, you set sda and then master leave 1 clock cycle.you can instruct me in this pinacle, where i can set my hardware and where i write my program.
Wed Dec 03 2008, 09:11 AM
#8
Sorry for the complaint yesterday.I wasnot calm. dealine is coming, so I am so worried:blush!Now,can I ask you a question .After eeprom get 1 byte from 89c51 ,it will pull down sda.what does this process happen ?In your code, after send 1 byte, you set sda and then master leave 1 clock cycle.you can instruct me in this pinacle, where i can set my hardware and where i write my program.
Wed Dec 03 2008, 09:34 AM
#9
Here is small screenshot tutorial explains u everything..
Click on image to enlarge if they are small

Your Pinnacle interface is like this..


go to Project -> Project Options select any I2c EEPROM you want, and then select the bus where u want to connect your eeprom on which bus. The address is kept 0. so that your 7-bit I2C address becomes 0xD0 (0xA0 for write, and 0xA1 for read). read datahseet for more information.
here is small screenshot explains that


in the same Project Option window, there is I2C Bus Configuration, click on that..
there you find option to setup pins you are using for I2C bus1 and 2.
so whatever pins you are using in your code for SCL and SDA, select them here..
here is screenshot that explains all.


Now you can open asm file or load the hex file, after that open the I2C bus window where your EEPROM is connected, in our case its I2C Bus 1.
got to View -> I2C Devices -> I2C Bus 1
and if you want to see I2C EEPROM content, then open
View -> I2C Devices -> Serial EEPROM


Hope this small tutorial was helpful
Tags I2C bus simulationPinnacle SimulationI2C simulation on Pinnacle 52I2C EEPROM simulationSPI simulationI2C SPI simulator

Get Social

Information

Powered by e107 Forum System

Conversation

No messages yet.

Downloads

Comments

Mirza123
Thu Jun 25 2020, 03:46 PM
eunicelove124
Mon Jun 22 2020, 03:03 PM
cerouno
Tue Jun 16 2020, 05:10 PM
Marce
Sat Jun 13 2020, 09:43 PM
Davidthils
Thu May 21 2020, 12:44 PM
Jakeror
Thu May 21 2020, 01:28 AM
motorCar
Wed May 20 2020, 07:05 PM
Vordrync
Wed May 20 2020, 11:52 AM

Online

Guests: 174, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38215
Newest member: Mirza123