Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

DS1307 and PIC16f877a interface

Status
Not open for further replies.

rajbabu

Junior Member level 3
Joined
Apr 2, 2010
Messages
29
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
indo
Activity points
1,459
Hello friends,

My hardware for DS1307 is working on 8051uc but when i am connecting Pic16f877a to it i got disturbed means at SCL pin 100khz frequency is not coming and at pin no. 2 of DS1307 33.768kHz frequencyis not coming.

i am using 100khz clock rate.
Confi for PIC i2c is
TRISC3 = 1; /* SDA and SCL as input pin */
TRISC4 = 1; /* these pins can be configured either i/p or o/p */
SSPSTAT |= 0x80; /* Slew rate disabled */
SSPCON = 0x28; /* SSPEN = 1, I2C Master mode, clock = FOSC/(4 * (SSPADD + 1)) */
SSPADD = 0x09; ; /* 100Khz @ 4Mhz Fosc */

I searched on net some of friends using
SSPADD = 0x0a; ; /* 100Khz @ 4Mhz Fosc */
SSPADD = 0x28; ; /* 100Khz @ 4Mhz Fosc */

for clock rate but according to formula
SSPADD = 0x09; ; /* 100Khz @ 4Mhz Fosc */
is right.


Regards
rajbabu:-?
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top