here a simple true binary clock i quikly made:
use the the code that syranide has posted:
Code:
N@OSTime
I@OSTimer
O@Hours Minutes Seconds
Seconds = floor(OSTimer) % 60
Minutes = floor(OSTimer / 60) % 60
Hours = floor(OSTimer / 3600)
then you need to wire the chip to a OStimer similar.
moreover you need my Dec->Bin Converter (Inspired by Syranide and tomb332):
Code:
N@Dec<->Bin
I@DecI P0I P1I P2I P3I P4I P5I P6I P7I
O@DecO P0O P1O P2O P3O P4O P5O P6O P7O Bin
DecO = 0
P0I -> DecO += 1;
P1I -> DecO += 2;
P2I -> DecO += 4;
P3I -> DecO += 8;
P4I -> DecO += 16;
P5I -> DecO += 32;
P6I -> DecO += 64;
P7I -> DecO += 128;
P0O=0
P1O=0
P2O=0
P3O=0
P4O=0
P5O=0
P6O=0
P7O=0
Bin=0
(floor(DecI/128) % 2) -> P7O = 1, Bin += 1;
Bin = Bin*10
(floor(DecI/64) % 2) -> P6O = 1, Bin += 1;
Bin = Bin*10
(floor(DecI/32) % 2) -> P5O = 1, Bin += 1;
Bin = Bin*10
(floor(DecI/16) % 2) -> P4O = 1, Bin += 1;
Bin = Bin*10
(floor(DecI/8) % 2) -> P3O = 1, Bin += 1;
Bin = Bin*10
(floor(DecI/4) % 2) -> P2O = 1, Bin += 1;
Bin = Bin*10
(floor(DecI/2) % 2) -> P1O = 1, Bin += 1;
Bin = Bin*10
(DecI % 2) -> P0O = 1, Bin += 1;
you need 3, one for hour, minute and second.
wire DecI from the first to Hour DecI from the secound to minute ...
connect Indicators or whatever to P0O to P4O for hours.
connect Indicators or whatever to P0O to P5O for minutes and seconds.
P0O is bit 2^0 = 1
P1O is bit 2^1 = 2
P2O is bit 2^2 = 4
....
by the way "Bin" gives the binary code. for example 10 on DecI will Output:
P3O=1 P1O=1 other will stay 0 and Bin will be 1010.
The chip can do the oposite to. if P0I to P7I get non 0 DecO will output the Decimal

(First row = Hour (16 on left site) ,Secound = Minutes and vertical = seconds (32 on upper end))
Bookmarks