T
treez
Guest
Hello,
I am coding in MPASM (microchip) for PIC18F65K22.
I have numbers contained in two registers,
One is called ana8, the other is called max_led_temp.
I wish to find out if the value in ana8 is greater than the value in max_led_temp.
Can I do this by subtracting ana8 from max_led_temp and checking if the Carry flag of the status register is set?…eg
(the numbers in either register may be between 0 and 255)
I am coding in MPASM (microchip) for PIC18F65K22.
I have numbers contained in two registers,
One is called ana8, the other is called max_led_temp.
I wish to find out if the value in ana8 is greater than the value in max_led_temp.
Can I do this by subtracting ana8 from max_led_temp and checking if the Carry flag of the status register is set?…eg
Code ASM - [expand] 1 2 3 4 5 movf ana8,w bcf STATUS,C subwf max_led_temp,w btfsc STATUS,C goto overtemp
(the numbers in either register may be between 0 and 255)
Last edited by a moderator: