what is a purpose of I2C Wr(0xD0) and I2C_Wr(0xD1) ??

Discuss with MikroElektronika software developers about current library development.
Post Reply
Author
Message
johnsonpay
Posts: 53
Joined: 27 May 2013 13:48

what is a purpose of I2C Wr(0xD0) and I2C_Wr(0xD1) ??

#1 Post by johnsonpay » 18 Jan 2014 13:28

What is a purpose of I2C Wr(0xD0) and I2C_Wr(0xD1) for ds1307 RTC.
anybody can explain to me

thanks.

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: what is a purpose of I2C Wr(0xD0) and I2C_Wr(0xD1) ??

#2 Post by Dany » 18 Jan 2014 18:42

johnsonpay wrote:What is a purpose of I2C Wr(0xD0) and I2C_Wr(0xD1) for ds1307 RTC.
anybody can explain to me

thanks.
Extract of the DS1307 datasheet:
The slave address byte contains the 7-bit DS1307 address, which is 1101000, followed by the
direction bit (R/W), which for a write is 0.
11010000 is 0xD0.
The slave address bytecontains the 7-bit DS1307 address, which is
1101000, followed by the direction bit (R/W), which is 1 for a read.
11010001 is 0xD1.

See perhaps also http://www.rosseeld.be/DRO/PIC/I2c%20in ... Pascal.htm, section 'I2c Addresses' and http://www.rosseeld.be/DRO/PIC/links.htm (search for "I2c") for more general I2c knowledge.
Last edited by Dany on 18 Jan 2014 18:49, edited 2 times in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

tpetar
Posts: 593
Joined: 27 Apr 2012 18:44
Location: Pancevo, Serbia

Re: what is a purpose of I2C Wr(0xD0) and I2C_Wr(0xD1) ??

#3 Post by tpetar » 18 Jan 2014 18:45

Hello,

Dany gave the right answer.

Read page 12 in DS1307 datasheet.


Best regards,
Peter

Post Reply

Return to “Library Development Discussion”