Having trouble moving some interrupt code from a 28X2 to a 20X2

wapo54001

Senior Member
I'm trying to move some interrupt-based code that I barely understand from a 28X2 to a 20X2.

The code uses pins A.1,A.2, and A.3 on the 28X2 and I'm trying to duplicate that operation on pins C.1,C.2, and C.3 on a 20X2. I've renamed the A port to the C port everywhere in the code and, since I'm using the same pin numbers and just a different port, I've left the masks the same as the original.

I'm not at all sure I've got it right. Is there a consideration that I'm not dealing with here other than the Port and being mindful of the pin numbers?

The part of the code that I believe is not working is in these three symbols:

Code:
'
SYMBOL InterruptMask =   %00001110     '00001110 ' allow interrupts on a.3,a.2,a.1
SYMBOL Rotated =           %00000110     '00000110
SYMBOL Clicked =            %00000001     'mask to test for a.1 high
The other day I found a posting that beautifully explained interrupts and masks and now I can't find it. Today in my extensive search for information I found another post where the poster said that while he understands most of the manual, he finds the explanation of SETINT and associated information highly confusing and not very useful. I fear I must agree. I wish I could find that post where someone intentionally set out a very understandable explanation of masks and interrupts, it was the first time I began to understand the whole business.
 

Technical

Technical Support
Staff member
'Clicked' sets bit 0, but bit 1 is referenced in the comment?
Without the rest of the code we can't really help.
 

wapo54001

Senior Member
@Technical, thank you for looking at this; I found the problem -- a "pinsa" that I needed to change to "pinsc" -- and now working just fine.
 
Top