Sections
You are here: Home Forum Devices and Hardware xbee pwm example?

xbee pwm example?

Up to Devices and Hardware

xbee pwm example?

Posted by Philip van Allen at July 02. 2008
Has anyone tried the PWM on the xbee? It would be very helpful to see what commands you've used to make it work. Also, if you know, can it use a separate power supply? Thanks!

Re: xbee pwm example?

Posted by Lou Deluxe at July 03. 2008

I did a little looking into that.  Unfortunately, the PWM doesn't appear to be directly controllable via commands.  If I'm wrong about this, I'm glad.  But it appears that the PWM output just mirrors the corresponding ADC input on the other xbee module in transparent mode.

As for a separate power supply, I don't know (though I suspect not).  You can always use a transistor or two to turn a totem-pole output into one that pulls up to or down from another supply.

Or are you talking about powering the entire xbee separately from the MC?  I'm not sure why you'd want to do that, but if you do, the grounds still have to agree, and you might have to do some conditioning on any signal lines between them so that if one (xbee or MC) is powered while the other isn't, the signal lines don't try to power the unpowered part through the protection diodes.

Re: xbee pwm example?

Posted by Liam Staskawicz at July 11. 2008
After a quick look, it appears there are AT commands that control the PWM. After configuring the appropriate output as a PWM output, you can send the M0 or M1 AT commands with a value from 0-1023 to set the PWM duty of either PWM0 or PWM1 respectively.

Re: xbee pwm example?

Posted by Lou Deluxe at July 11. 2008

Previously Liam Staskawicz wrote:

After a quick look, it appears there are AT commands that control the PWM.

Excellent.  I hate that I missed it, but I'm glad it's there.

Now if the cycle length can be set and if it can be triggered at the AC zero crossing, maybe a dimmer is possible.  I'm not holding my breath for the latter, though.
Powered by Ploneboard
Document Actions