Hello,
Im using the Version 4 Digital Clock Example written for an LCD and converting it to drive individual 7 Segment LED Displays.
Issue i am having is converting Hours, Minutes and Seconds (declared as Bytes in the example) to individual digits so they can be displayed on the 7 Segment LED Macro
for example if Hours = 12 then I need to separate this into a 1 for Hours "Tens" position and 2 for Hours"Ones" position - same for minutes and seconds.
The LED 7 Segment Macro will not deal with a 2 digit number - wants individual digits.
Thanks for any help
LED Digital Clock using V4 Digital Clock Example
Moderator: Benj
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: LED Digital Clock using V4 Digital Clock Example
Hello gggwww.
There are quiet a few examples of separate hours minuets etc.
Dutchie_World_Wide has created a nice example and can be found here:
http://www.matrixmultimedia.com/mmforum ... f=2&t=7571
Although using an LCD display, would be easily converted for LED.
There are quiet a few examples of separate hours minuets etc.
Dutchie_World_Wide has created a nice example and can be found here:
http://www.matrixmultimedia.com/mmforum ... f=2&t=7571
Although using an LCD display, would be easily converted for LED.
Martin
Re: LED Digital Clock using V4 Digital Clock Example
Hello
Thanks for the quick reply. I looked through your example and have difficulty following how to do parsing of a 2 digit number to its individual digits.
Is there a straightforward way of doing this in flowcode?
Thanks:)
Thanks for the quick reply. I looked through your example and have difficulty following how to do parsing of a 2 digit number to its individual digits.
Is there a straightforward way of doing this in flowcode?
Thanks:)
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: LED Digital Clock using V4 Digital Clock Example
Hello,
number = 35
digit1 = number / 10
digit1 = digit1 MOD 10
digit1 = 3
digit2 = number MOD 10
digit2 = 5
number = 35
digit1 = number / 10
digit1 = digit1 MOD 10
digit1 = 3
digit2 = number MOD 10
digit2 = 5
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel