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

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

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
Attachments
Lectur_Affich.fcf
(14.5 KiB) Downloaded 246 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
medelec35
Valued Contributor
Valued Contributor
Posts: 7119
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 1917 times
Been thanked: 2767 times
Contact:

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

Martin
These users thanked the author medelec35 for the post:
Benj (Wed Mar 29, 2017 12:22 pm)
Rating: 5.88%
 
If your hardware is not working as expected, try looking here first:
http://www.matrixmultimedia.com/mmforum ... =26&t=6936