Shop OBEX P1 Docs P2 Docs Learn Events
OR gate — Parallax Forums

OR gate

LightfootLightfoot Posts: 228
edited 2005-12-28 01:18 in General Discussion
I attempted to program an or gate using the ra channel for inputs. It does not work. This code may not work, it is an approximation of what I did.

plp_a = 0
tris_b = 0
rb = 0
a var byte
b var byte
cc var byte
d var byte
result var byte

Main

a = ra.0
b = ra.1
cc = ra.2
d = ra.3
result = a | b
result = result | cc
result = result | d

rb.0 = result

goto Main:

Comments

Sign In or Register to comment.