PDA

View Full Version : simple way?



peterdeco1
- 29th June 2005, 11:14
Hello Everyone. Here is a piece of code. It simply turns an X10 module (with the address 0,0) on, it waits 1 second and turns it off. This works perfectly. What I want to do is use only the first line and replace unitOn with a command that will turn on if it's off and turn off if it's on. Like the "toggle" command. I guess I could use the read and write commands to "remember" the state of the module but was hoping for an easier way. Thanks for any suggestions.

XOUT PORTA.4, PORTA.5, [0\0,0\unitOn]
Pause 1000
XOUT PORTA.4, PORTA.5, [0\0,0\unitOff]
Pause 1000

Acetronics2
- 29th June 2005, 12:12
Your answer is hidden in the Pbpicxx.libs ...XOUT section ...

Alain