I have two Xbee units setup; one as a coordinator and the other as a remote. I send remote API commands to the remote unit to alter the state of DIO0 and PWM1. First I send a remote M1 command to change the value of PWM1 and that works fine. Then I send a D0 command to change the DIO0 pin either hi to lo, or lo to hi. Once I do that the PWM1 line stops completely. I ran further tests and found that changing any DIO line has the same effect.
Has anyone else come across this? Is that they way it’s supposed to work, is it a bug, is it a feature?
For those of you interested, I received a reply from Digi Support.
This behavior is due to the way DIO pins are set on the module. When any IO setting is changed (including sample rate, change detect, etc.) the module reinitializes the IO pins and the PWM pins are set back to 0. There is no way to stop this behavior with the current firmware.The best possible workaround that I can think of is to use API mode and send a type 0x08 with a new M1 command following any other change to an IO setting.