This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28032: Reading GP input from assembly

Part Number: TMS320F28032

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