Hello,
To perform a test of an input in assembly, I made this code
MOVW DP,#_GpioDataRegs.GPADAT.bit.GPIO20
MOV AL,@_GpioDataRegs.GPADAT.bit.GPIO20
ANDB AL,#0x0010
SB JUMP_ZERO,EQ
This code works, but test all GpioDataRegs.GPADAT inputs not only GPIO20 as i wrote (similar to C write) without any build errors. This is why I made 0x0010 for testing instead of 0x1 to test GpioDataRegs.GPADAT.bit.GPIO20. perhaps I do a mistake.
Could you please help me, i found lot of SET and CLR examples but nothing about reading/testing an input in assembler.
Thanks for your help,
Regards
Ol