I2C driver of RTC (DS1307)for FX2LP

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
siac_2560096
Level 1
Level 1
First reply posted First question asked First like given

i need sample code for RTC

0 Likes
1 Solution
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello,

FX2LP I2C acts only as a master. You can connect the DS1307 device as a slave on the I2C bus. To communicate to the DS1307, you can use the EZUSB_WriteI2C() or the EZUSB_ReadI2C() APIs that come with the EZUSB.LIB library file. The source of the library file containing the definition of these APIs is present as part of the CY3684 DVK at the following location.

C:\Cypress\USB\CY3684_EZ-USB_FX2LP_DVK\1.1\Target\Lib\LP\i2c.c

C:\Cypress\USB\CY3684_EZ-USB_FX2LP_DVK\1.1\Target\Lib\LP\i2c_rw.c

Best regards,

Srinath S

View solution in original post

0 Likes
1 Reply
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello,

FX2LP I2C acts only as a master. You can connect the DS1307 device as a slave on the I2C bus. To communicate to the DS1307, you can use the EZUSB_WriteI2C() or the EZUSB_ReadI2C() APIs that come with the EZUSB.LIB library file. The source of the library file containing the definition of these APIs is present as part of the CY3684 DVK at the following location.

C:\Cypress\USB\CY3684_EZ-USB_FX2LP_DVK\1.1\Target\Lib\LP\i2c.c

C:\Cypress\USB\CY3684_EZ-USB_FX2LP_DVK\1.1\Target\Lib\LP\i2c_rw.c

Best regards,

Srinath S

0 Likes