Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help!I2c doesnt work without I2c debugger in proteus

Status
Not open for further replies.

ramxis

Newbie level 5
Newbie level 5
Joined
Sep 15, 2011
Messages
8
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,424
hi the problem i am having is m code works fine when i2c debugger is attached but when i remove it i2c stops working this is part of my fyp and i am goin to be moving on to the hardaware design but i dont have an i2c debugger to attach to hardware so please help figure out why is this happening and how to get rid of the problem. Two of my devices work on i2c the eeprom and the ds1307 rtc rtc always gives 00:00:00 and eeprom output shows boxes ihave attached all three images . I should point out when i have the I2c debugger attahced everything starts working fine again,


working.pngnotworking.pngUntitled.png
 

hi thank you for replying i did as u advised changing the resistor to digital pull ups didn't do anything in fact it just kept the lcd blank and the leds bf,sspov,acstat got lit up indicating that an ack was not received,a buffer overflow has occurred etc. Additionally i was unable to set the value for digital pull ups i am not sure if proteus has the option to change pullup resistors value or if i was just unable to set there value. please help me figure out how to get this working in hardware as i will not have an i2c debugger there

---------- Post added at 22:15 ---------- Previous post was at 22:12 ----------

ok i was able to set the value didnt realize that it was same as analogue but still lcd remained blank and indicating that ,ack was not received and overflow has occured
 

remove the pullup and debugger to run it on proteus correctly,otherwise change the pullup resistors to digital,for checking it in hardware u should make proper bus timing.

i think the attached proteus design will help you
 

Attachments

  • rtc.rar
    18.8 KB · Views: 336
remove the pullup and debugger to run it on proteus correctly,otherwise change the pullup resistors to digital,for checking it in hardware u should make proper bus timing.

i think the attached proteus design will help you
 
  • Like
Reactions: ramxis

    ramxis

    Points: 2
    Helpful Answer Positive Rating
Thanks sps i did as u advised removing puulups and changing them to digital didnt help .i have developed the hardware in hardware the it shows ??:??:?? in time and date values i am attaching my project with proteus design could u please take a look at it and let me know what am i doin wrong proteus design not working is not an issue any more all my marking is on getting the harware to work coz if i dont get it to run in time i wont be able to move ahead in my project please take a look at the code and design and let me know what can i do to make it work on actual hardware
 

Attachments

  • working.rar
    210.7 KB · Views: 244
Here is your DSN (attached) but it's working now as well :)
(with or without I2C debugger)

Changes:
- R2 and R3 pullups are now DIGITAL (not analogue as I wrote above).
- the pullups and the LCD Vcc are now on VCC (not a different +5v)
- the LCD Vss is grounded now (not 0v)
- osc circuit is removed (unnecessary is ISIS)

Good luck!
 

Attachments

  • test_working.zip
    12.3 KB · Views: 320
Thankyou Zuisti you were a big help can you please guide me as to what changes can i make in my hardware to get it working right there . If you could look through the code and tel me if any changes needed to be made there or anything i can change in my bread board design i have just copied the circuit from my dsn design on bread board there all leds lit up indicating either a buffer overflow occurred, write collision occurred , ack wasnt received from slave device or an overflow happened
 

Hi ramxis;

Sorry but I cannot help. I don't have (and don't like) HITECH C, I'm working in assembly, also using Proton compiler
but only as a very smart assembler, without its high level (library) routines. Rather, I'm writing myself these.
And ... Hitech's asm output is horrible, Proton's is very clear and useful (at least in my opinion ...)
Other: I use only the Proteus simulator, unfortunately my eyes are weak now.

However, I looked your code but it is not clear for me. I see you are not using the compiler's library (but I don't have i2c.h)
for the HW I2C, but - for example - how to control the leds? I don't understand your code good enough.

Your generated COF file is unable to debugging at source level in ISIS. Says it's for PIC18 (?). Proton's is usable.

Maybe someone who knows this C compiler, can help you.
 

In my 4 years of engineering i never used built in libraries for embeded applications as i feel it takes me more time to go through some body else's code then to develope my own the led's are just the register bits which am outputing to the led's to indicate what kind of error it is which is preventing i2c from synchronizing with the slave as am using MSSP module of pic16f in hardware master mode . Any ways thanks a lot for all your help i really appreciate it. Thank you so much *** bless you
 

I am Having the same Problem I am solved ..... thanks Guys u r helped me alot.... :)
 

hi the problem i am having is m code works fine when i2c debugger is attached but when i remove it i2c stops working this is part of my fyp and i am goin to be moving on to the hardaware design but i dont have an i2c debugger to attach to hardware so please help figure out why is this happening and how to get rid of the problem. Two of my devices work on i2c the eeprom and the ds1307 rtc rtc always gives 00:00:00 and eeprom output shows boxes ihave attached all three images . I should point out when i have the I2c debugger attahced everything starts working fine again,


View attachment 63303View attachment 63304View attachment 63305

Thank you very much it was useful for me too
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top