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.

DS1307 I2C speed

Status
Not open for further replies.

misterR

Member
Hello,
I have few question for communicating on I2C and pic16f877 with 20Mhz or any other frequency.
The Ds1307 work at 400khz speed nearly.
if we set adjust or upgrade the time register to real time.
then micro controller will pick the data from the chip at what rate i mean at what time every cycles?
because second is continously increaing every 1 sec .
should micro check it regularly?
the data every Milli sec or sec like that on?

read data {
}
 
one thing more almost all electronic appliance are using some sort of time keeping chip.
in our computer or mobile which chip are used more in this world?
 
hi,
Consider using the 1 second output signal from the DS1307 as an interrupt to your MCU.
Pin #7
E
 
ok, pin 7 is SQW/OUT
so it is to be used?
which micro will be best avr pic or 8051 in all term cost and life.
 
Hello,
The micro controller is named as P89C51RD2 IS THAT SAME FOR 8051?
and you are not using pin7?
and are you sir using software based I2C?

writeRTC: ; R2 = byte address.. R1 = data
acall startc
mov a,#0D0h ; RTC address
acall Send
acall ack ; Get ack
mov a,R2 ; register address
acall Send
acall ack
mov a,R1 ; send data
acall Send
acall ack
acall stop
ret

readRTC:
acall startc
mov a,#0D0h ; Device address
acall Send
acall ack
mov a,R2 ; Register address
acall Send
acall ack
acall rstart
mov a,#0D1h ; Read command
acall Send
acall ack
acall recv
mov R1,a ; Get data
acall nak
acall stop
ret
 
There are soooo many 8051 variants.... Many manufactures have had a go

ATMEL AT89c and AT89s series
PHILIPS P89 series
TI
Microchip
ST

They are all code compatable to the basic INTEL 8052... Some have "extra's" so read the datasheet..
 
I am one of the few guy's here that love the 8051... I can do about as much as I can on these little things, but programming them requires "special" hardware or software... I used the Philips P89c664 because of the bootloader.. Programming this device was a doddle.... Trying to get a dev board that supports chips that aren't going out of fashion is a real task.... Atmel's series of 8051 are easy to get hold of but you need programming tools..

Lets assume you get a prog / dev board and lets assume the one I had!! Project developed! Now where to buy the chip!!! Hold the phone... Not available anymore!!!.. I can buy the p89v664 but in a different package..

Using Pic.... I develop... I program.. When the chip getts more expensive, I buy the latest one that seems to be backwards compatible.... One project went from pic16f877... pic16f877a... pic16f887 and all I had to do was re-compile...
 
Many or most people are using and selling product based on 8051, why?
they said it is cheaper.
It's entirely up to you... If you want to use the 8051 I will continue to help you... I was only voicing my opinion.
 
Status
Not open for further replies.

Latest threads

Back
Top