no-software internal RTC

Current solutions and designs.
Posts: 452
Joined: Tue Nov 28, 2017 1:32 pm

Re: no-software internal RTC

Post by Petari » Tue Jul 17, 2018 1:34 pm

I traced it down, and looked in literature - ProfiBuch has all needed except TOS code .

So, time, date goes to, comes from IKBD chip in packed BCD format. Every value is 1 byte - year, month, day, hours, minutes, secs. - total 6 bytes.
And that means too, that max year span is 100 years - 0 to 99 . Values over 99 are invalid, so supposed $B8 is bad. Or any value what contains not 0-9 cypher. And max 99 is OK - that means that max year value would be 1980+99 = 2079 . And why it is not so in reality ? Because TOS coders had again some 'great' solution - their TOS code (I looked 1.04) adds $80 to packed BCD value of year before writing it to IKBD, so it will keep real year (of century), after xx80. But that lowered year span to only 20 . After reading year from IKBD, BCD value is converted to binary and $50 is subtracted - what is same - 80 .
I made quick test by removing those 2 operations in TOS 1.04 and with it IKBD chip really handles well year 2018, or 2066 ... Problem solved.
Another TOS fix is done . What I know is that it must be little different in 2.06, but that for some other time .
There is 2 kind of people: one thinking about moving to Mars after here becomes too bad, the others thinking about how to keep this planet habitable.

Post Reply