Setint or

roho

Member
Hello all,

Just to double check my understanding of this command. Device in question is a 14M2 and the exact command I'm using is:

SETINT OR 0x06, 0x07

My understanding is that this will interrupt when either of C.2 or C.1 are high or C.0 is low, or perhaps more pertinently in the circumstances, should not interrupt when both C.2 and C.1 are low and C.0 is high. Is this correct or am I misunderstanding something?

As an after thought, would:

SETINT NOT 0x01, 0x07

achieve the same aim?

Roger.
 

hippy

Technical Support
Staff member
Yes, both commands are equivalent and will behave as desired. The quickest way to get confirmation is to try it, simulate a small test program under PE6 ...

Code:
#Picaxe 14M2

Main:
  Gosub Interrupt_Enable
  Do
  Loop

Interrupt:
  SerTxd( #pinsC, " " )

Interrupt_Enable:
  SetInt OR 0x06, 0x07
  Return
 
Top