Question about Propeller Manual
mynet43
Posts: 644
I'm using the waitpeq and waitpne commands.
On page 327 of my old manual it gives examples that don't look right:
waitpeq(%100000, 5, 0) ' Wait for Pin 5 to go high
waitpeq(%000000, 5, 0) ' Wait for Pin 5 to go low
These don't look right.
Shouldn't they be:
waitpeq(%100000, %100000, 0) ' Wait for Pin 5 to go high
waitpeq(%000000, %100000, 0) ' Wait for Pin 5 to go low
Are these typos, or am I missing something?
Thank you for the help.
Jim
On page 327 of my old manual it gives examples that don't look right:
waitpeq(%100000, 5, 0) ' Wait for Pin 5 to go high
waitpeq(%000000, 5, 0) ' Wait for Pin 5 to go low
These don't look right.
Shouldn't they be:
waitpeq(%100000, %100000, 0) ' Wait for Pin 5 to go high
waitpeq(%000000, %100000, 0) ' Wait for Pin 5 to go low
Are these typos, or am I missing something?
Thank you for the help.
Jim
Comments
Usually I do:
waitpne( 0, |<5, 0) ' Wait for pin 5 to go high
waitpeq( 0, |<5, 0) ' Wait for pin 5 to go low
That way I have less risk in getting the position of the bit wrong somewhere.
I thought that was right, but I've been wrong before.
I like the |<5 too, I was just trying to make it look like the other examples.
Thanks again,
Jim