@ Chris Savage or other DS1302 knowledge gurus basic timer
Hi Chris or other DS1302 knowledge gurus. I have a homework board basic stamp and need it to check to see if two input variables match the outputted Hours and Minute variables from the DS1302. If you search down to the subroutine LOOPY you will see what I am trying to do.
Basically I have two input variables: mincounter and hourcounter
The DS1302 has two output variables: Hours and Minutes
I want to test if these are the same and if they are go to the subroutine crack.
My guess is that the variables are in different formats i.e. hexadecimal and integer
How can I get this program to test if these two variables are the same. Any help would be greatly appreciated.
p.s. I tried taking a look at the basic timer in another post but could not figure out the syntax.
Basically I have two input variables: mincounter and hourcounter
The DS1302 has two output variables: Hours and Minutes
I want to test if these are the same and if they are go to the subroutine crack.
My guess is that the variables are in different formats i.e. hexadecimal and integer
How can I get this program to test if these two variables are the same. Any help would be greatly appreciated.
p.s. I tried taking a look at the basic timer in another post but could not figure out the syntax.
Comments
The format stored on the DS1302 is BCD, but if you specify your values in HEX it will work. You’re comparing to decimal digits, so that’s where the compare problem is. I hope this helps. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
[/code][/size]
Where counter is the source and destination...If you want these converted into a separate variable then just replace the first instance of counter with the new target variable name.· I hope this helps.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support