OR

Set specified pins to 1. Logical OR.

Syntax

or [<mask> [count]]
+ [<mask> [count]]

Parameters

count
  • Decimal number from 2 to 100, tells how many times next command or block will be retried.

<mask>
  • 1) Sequense of 0 or 1, for ex. 111000111000.
  • 2) Enum of bit-numbers at bracket, for ex. (1), (2,3,4) or (8,12,5,11), its accordingly to 100000000000, 011100000000 or 000010010011. First left bit is 1 (but not zero).

Example

sleeps 500 ; Set sleeps = 500 ms
 
CYCLE:    ; Define Label
 
off        ; Set all outputs to LOW state
+
off
or 1000000 ; Switch output 1 to HIGH state
or 0010000 ; Switch output 3 to HIGH state
or 0000100 ; Switch output 5 to HIGH state
or 0000001 ; Switch output 7 to HIGH state
0          ; Set all outputs to LOW state
or(1)      ; Switch output 1 to HIGH state
or(3)      ; Switch output 3 to HIGH state
or(5)      ; Switch output 5 to HIGH state
or(7)      ; Switch output 7 to HIGH state
0          ; Set all outputs to LOW state
+(1)       ; Switch output 1 to HIGH state
+(3)       ; Switch output 3 to HIGH state
+(5)       ; Switch output 5 to HIGH state
+(7)       ; Switch output 7 to HIGH state
-(1)       ; Switch output 1 to LOW state
-(3)       ; Switch output 3 to LOW state
-(5)       ; Switch output 5 to LOW state
-(7)       ; Switch output 7 to LOW state
+(1,3,5,7) ; Switch outputs 1, 3, 5, 7 to HIGH state
-(3,5)     ; Switch outputs 3, 5 to LOW state
-(1,7)     ; Switch outputs 1, 7 to LOW state
+10101010  ; Switch outputs 1, 3, 5, 7 to HIGH state
+01010101  ; Switch outputs 2, 4, 6, 8 to HIGH state
-10101010  ; Switch outputs 1, 3, 5, 7 to LOW state
 
goto CYCLE ; Infinite cycles
exor.gif