mpc5200 and PWM
Jon Smirl
jonsmirl at gmail.com
Mon Jan 26 02:44:38 EST 2009
On Sun, Jan 25, 2009 at 1:24 AM, Grant Likely <grant.likely at secretlab.ca> wrote:
> On Sat, Jan 24, 2009 at 6:20 PM, Jon Smirl <jonsmirl at gmail.com> wrote:
>> Is it possible to use Bestcomm with PWM to generate complex waveforms?
>> For example change the frequency and duty cycle after each cycle? Has
>> anyone tried doing this? I'd like to build a table of count/width
>> pairs and then feed them to the PWM pin without taking an interrupt on
>> each cycle.
>
> I assume you're looking at using one of the GPT PWMs devices, correct?
Yes, so this is as hard as I thought it would be. I think I'll stick
with Plan A and use a PSC to make the wave form.
We're trying to figure out a cheap way to add X10/Insteon support. You
can buy PIC chips to do it but they cost $10 with the software
license. The external transmit receive circuitry costs about $2 to
build. I have the output from it hooked up to a PSC. The signals are
131.65Khz BPSK. I need to get the mpc5200 to make and decode those
signals.
We want to use X10/Insteon in combination with a keypad to do volume
and channel selection. But it works the other way around too. The same
circuit can turn the lights off/on.
I'd love to get a GPL driver in the kernel for X10/Insteon that just
needs the $2 of external circuitry. I'll write one if I can figure out
how to do the low level signal processing (my background in it is
zero) to get at the packets. I'm not having much luck decoding the
BPSK since it has a lot of noise and frequency variance in it.
> If so, the you probably cannot do what you want easily. While you
> may be able to writing a custom bestcomm task to write into the PWM
> registers, the bestcomm engine isn't wired up to the PWM and so cannot
> be triggered on PWM events.
>
> However, the gpio blocks are wired up to the Bestcomm engine so they
> can be used as requestors, so if you wired up the PWM output to one of
> the GPIO inputs, then you may be able to do something with that.
>
> g.
>
> --
> Grant Likely, B.Sc., P.Eng.
> Secret Lab Technologies Ltd.
>
--
Jon Smirl
jonsmirl at gmail.com
More information about the Linuxppc-dev
mailing list