In the example I sent you, rung 14 shows you how to mask off the minute from the high byte of %R1704 leaving the hour in the low byte of %R1706.
Rung 16 shows how to mask off the hour from the low byte of %R1704 and then shift the result (minute) to the low byte of %R1707.
Use the AND function with the appropriate mask to isolate the hour and minute data. Then, if you need to shift from low byte to high byte, multiply by 256. If you need to shift fro high byte to low byte, divide by 256. Once you have the data you want in the high and low bytes of two separate words. with zero in the opposite byte of each word, use the OR function to combine them into a single word.
Thank you. I'm testing. am I doing something wrong? the in1 and in2 are good but the Q is not? any idea