linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* mpc5200 and PWM
@ 2009-01-25  1:20 Jon Smirl
  2009-01-25  6:24 ` Grant Likely
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Smirl @ 2009-01-25  1:20 UTC (permalink / raw)
  To: linuxppc-dev

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.

-- 
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mpc5200 and PWM
  2009-01-25  1:20 mpc5200 and PWM Jon Smirl
@ 2009-01-25  6:24 ` Grant Likely
  2009-01-25 15:44   ` Jon Smirl
  0 siblings, 1 reply; 3+ messages in thread
From: Grant Likely @ 2009-01-25  6:24 UTC (permalink / raw)
  To: Jon Smirl; +Cc: linuxppc-dev

On Sat, Jan 24, 2009 at 6:20 PM, Jon Smirl <jonsmirl@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?
 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mpc5200 and PWM
  2009-01-25  6:24 ` Grant Likely
@ 2009-01-25 15:44   ` Jon Smirl
  0 siblings, 0 replies; 3+ messages in thread
From: Jon Smirl @ 2009-01-25 15:44 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev

On Sun, Jan 25, 2009 at 1:24 AM, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Sat, Jan 24, 2009 at 6:20 PM, Jon Smirl <jonsmirl@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@gmail.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-25 15:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-25  1:20 mpc5200 and PWM Jon Smirl
2009-01-25  6:24 ` Grant Likely
2009-01-25 15:44   ` Jon Smirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).