Jump to content

Hexadecimal number question

da na

I am writing a program that needs to constantly check a clock stored in hexadecimal, and this has been far more challenging than I anticipated.

At the beginning, the program sets the clock to zero. I want the time to  last twenty seconds.


I originally had twenty in hexadecimal as uTime, but I made a program that printed out the clock every 1 second and found that the time was returned in decimal. 

I wrote a time troubleshooting program, which showed bizarre jumps - 7 to 9 is just an issue of polling the system clock at too slow an interval, but... 9 to 16? 


I believe the issue is that the scripting language requires variables to be designated as either 's' or 'u', with 's' being for a string of numbers and 'u' being for an integer.

I suspect the jumps are because when the program fetches a time from the clock (in hexadecimal) and the clock returns, say, an A or F, the program jumps to the next hexadecimal number that does not have any letters, because the stored variable cannot have any non-integer characters - even decimal points.


I am writing this program in Digita scripting language to run on Flashpoint Digita cameras. I do not expect a single person to know what the hell that is, but this seems, to my amateur eyes, to be a general hex to decimal conversion issue.

Since 6 numbers out of every 15 just can't be stored and processed by the program, it seems my easiest way to fix this is not to re-write the program, but to use a formula.

So if I wanted 20 seconds, I'd set the clock to 26...? 


Any help would be appreciated!

Link to comment
Share on other sites

Link to post
Share on other sites

That looks like the clock is returning the time as BCD, precisely to avoid using A-F

Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case


Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED


GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now