Flowcode V4 Problem DS1307 ( I2C )

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Posts: 1
Joined: Tue Mar 28, 2017 8:21 pm

Flowcode V4 Problem DS1307 ( I2C )

Postby Dan55 » Tue Mar 28, 2017 9:29 pm

I do not speak English very well saddened then I have to make a personal project but I have a problem with my rtc. which is the DS1307 in I2C I do not arrive has to post(show) the seconds but the minutes and hours of posters as if secondes était block par les minutes merci d'avance pour les réponses je vous fait joindre mon FLOWCODE
(14.5 KiB) Downloaded 320 times
Last edited by EtsDriver on Wed Mar 29, 2017 5:12 am, edited 2 times in total.
Reason: Moved topic to correct area. Welcome to forums. For posting on v4 area please take a look at this http://www.matrixtsl.com/mmforums/viewtopic.php?f=29&t=8762 and end of support note http://www.matrixtsl.com/mmforums/viewtopic.php?f=29&t=14301

User avatar
Valued Contributor
Valued Contributor
Posts: 8802
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2550 times
Been thanked: 3704 times

Re: Flowcode V4 Problem DS1307 ( I2C )

Postby medelec35 » Wed Mar 29, 2017 12:16 pm

Hi Dan55,
For your calculations you can use:

Code: Select all

Second = (Second >> 4) * 10 + (Second & 15)
Minut = (Minut >> 4) * 10 + (Minut & 15)

Which converts BCD to Decimal.
Same format for when you add hours

These users thanked the author medelec35 for the post:
Benj (Wed Mar 29, 2017 12:22 pm)
Rating: 5%

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.