Do programming to see if the RAM location 37H contains an even value. If so, send it to P2. If not, make it even and then send it to P2. Test result in Simulator registers windows.

ORG 0000H

MOV A,37H

MOV B,#02H

DIV AB

MOV A,B

CJNE A,00H,NEXT

SJMP GO

NEXT:INC 37H

GO:

MOV P2,37H

END 

Comments

Popular posts from this blog

Wire wound strain gauge

SemiConductor type strain gauge

Do an ALP to compare two eight bit numbers NUM1 and NUM2 stored in external memory locations 8000h and 8001h respectively. Reflect your result as: If NUM1NUM2, SET MSB of location 2FH (bit address 7FH). If NUM1 = NUM2, then Clear both LSB & MSB of bit addressable memory location 2FH.