Hi,
my program:
EP: MOV A,ADC0H CJNZ A,#175D,EP
i have problem jumping to the next subrountine
when i detect 1.75V from power supply it will start to display if not it will display 0V
any advice?
Long time since I had to care abot '51 assembly but:
CJNZ = Compare Jump Not Zero
You are comparing if the voltage is exactly 1.75V or not. Are you sure you want to catch exactly 1.75V, and not want to check for voltages above or below? AD converters are not exact. They always measure with a tolerance and with jitter from noise.
Also, if you want to jump to another routine, don't you think your code should specify a jump to that other routine? Where do you think your code will jump?
i am sorry to mislead my question, haha i do not wan to display voltage lesser than 1.75 but above,
after my program it will just move on to my next subrountine itself,
something like this
MOV A,ADC0H EP:CJNE A,#4BH,EP
;============ ;Print Result ;============ CO:MOV A,#'C' LCALL DISPLAY MOV A,#'O' LCALL DISPLAY
correct me if i am wrong.
View all questions in Keil forum