Real time clock DS1307 using I2C

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Real time clock DS1307 using I2C

Post by Jan Lichtenbelt »

(Earlier publications using ds1307 are available in this Forum. Thus, this is not new!)

Learning I2C I found the sample Flowcode I2C_DS1307_Eaxample.fcfx
http://www.matrixtsl.com/wikiv7/images/ ... rTest.fcfx in the Flowcode help.
It took a while, but find out that it is only a simulation version.

To find out what the problems are using I2C in practice, I build a setup with the 16F1939 (40 pins) microchip and the EB005-006 and 007 boards (LCD, multiprogrammer board and 8-push button switches board) in connection with an DS1307 real time chip with battery backup. SDA (data) is connected to C4 and 4k7 to Vcc and SCL (clock) to C3 and 4k7 to Vcc.

After learning to work with number conversions to BCD, I made a program which can change the clock by means of 3 push buttons B0, B1 and B2:
B0: Start and reset seconds to zero
B1: Increase minutes with one
B2: increase hours with one

With kind regards

Jan Lichtenbelt
DS1307RealTimeClock_V2.fcfx
(25.3 KiB) Downloaded 566 times

Post Reply