Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I2C interfacing prob

Status
Not open for further replies.

sanjoy

Member
In my project im working with PIC16f876A &ds3232. while Acquiring data from ds3232, it seems PIC cannot able to read from ds3232.
In proteus VSM debugging, it is seen that the registers of ds3232 did not copy the initialize values that i ve given in mikroC program.
in a simplified model of project, The PORTB cannot produce the required value.
If u have some time to spear, pls go through the program and simulation and let me know the possible cause of the problems.
Thanks
 

Attachments

  • Program_rev.rar
    33.8 KB · Views: 205
First question is the I2C connections , pullups etc, as i cannot open .rar files what slave address are you using for DS3232 ?
 
10,9,8,7...... Using analogue resistors.... replace the two 2k2 I2C bus resistors to "Pullup" and it should work
Thanks for reply. To enable weak pull-ups, appropriate TRIS bit(s)=1, and RBPU bit (OPTION_REG<7>)=0; TRIS bits of port B. but SCL &SDA ports are on RC3, RC4 respectively . so how the program should be written here..
 
Thanks for reply. To enable weak pull-ups, appropriate TRIS bit(s)=1, and RBPU bit (OPTION_REG<7>)=0; TRIS bits of port B. but SCL &SDA ports are on RC3, RC4 respectively . so how the program should be written here..
No! its for simulation only... Analogue resistors do not work... You must replace them in the schematic for digital pullup.. In the real world the 2k2's will be fine..
 
No! its for simulation only... Analogue resistors do not work... You must replace them in the schematic for digital pullup.. In the real world the 2k2's will be fine..
how digital pullup is employed here.. pls give me some hints..
 
Last edited:
Okay.... In the real world the SDA and the SCK are pulled high by resistors 2k2 ~ 10k.. In ISIS they are too noisy and add far too much processing time... Using a digital simulator make the I2C bus work...
 
Okay.... In the real world the SDA and the SCK are pulled high by resistors 2k2 ~ 10k.. In ISIS they are too noisy and add far too much processing time... Using a digital simulator make the I2C bus work...
digital simulator ---it might be in the I2C debugger in instrument options of Proteus
 
Resistor pullup!!!! Its a component...
here...
isis1.jpg
Here they are fitted!!!
isis2.jpg
 
wow it worked. ds3232 is getting initialize data as programmed. thanks for great help. it wd be impossible to find without ur advice.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top