PAK VIII and PWM (hello Al!)
Archiver
Posts: 46,084
Hi Al:
I'm readying a circuit and a program to make use of a PAK8. Looks
like a very useful gadget, especially now that the Intersil CDP68HC68
is out-of-production (and it only had 1 channel of PWM, too).
Question:
PAK8 needs us to set both the number of low time steps (duration) as
well as the high duration to define each cycle of PWM.
Does the PAK8 care if either DURHIGH or DURLOW = 0 ?
I'd like the flexibility of having a channel all off or all on without
forcing status to HIGH or LOW state.
Thanks,
Pat Matthews
I'm readying a circuit and a program to make use of a PAK8. Looks
like a very useful gadget, especially now that the Intersil CDP68HC68
is out-of-production (and it only had 1 channel of PWM, too).
Question:
PAK8 needs us to set both the number of low time steps (duration) as
well as the high duration to define each cycle of PWM.
Does the PAK8 care if either DURHIGH or DURLOW = 0 ?
I'd like the flexibility of having a channel all off or all on without
forcing status to HIGH or LOW state.
Thanks,
Pat Matthews
Comments
I think we crossed e-mails since I just sent you a response from the message
you left me over the weekend (too much going on this weekend to be on top of
my mail :-( ).
If I recall, setting the duration to 0 will not disable that duration -- it
will treat it as $FFFF+1. However, there is a command to jam any output high
or low.
01000CCC will set channel CCC to 0 and 01001CCC will force to 1.
Regards,
Al Williams
AWC
* 8 channels of PWM
http://www.al-williams.com/awce/pak5.htm
>
Original Message
> From: Pat Matthews [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=6982J_o_m2jGgRvIFIbMs7mVsNictHgV3g8_R3tIdNpZIj_AfEg6eY2CnOHI18xGhUpVm2KSSc57EdH2]patmat2350@a...[/url
> Sent: Monday, October 29, 2001 10:25 AM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Re: PAK VIII and PWM (hello Al!)
>
>
> Hi Al:
> I'm readying a circuit and a program to make use of a PAK8. Looks
> like a very useful gadget, especially now that the Intersil CDP68HC68
> is out-of-production (and it only had 1 channel of PWM, too).
>
> Question:
> PAK8 needs us to set both the number of low time steps (duration) as
> well as the high duration to define each cycle of PWM.
> Does the PAK8 care if either DURHIGH or DURLOW = 0 ?
> I'd like the flexibility of having a channel all off or all on without
> forcing status to HIGH or LOW state.
>
> Thanks,
> Pat Matthews
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
> Subject and Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
> Hi Pat,
...
> If I recall, setting the duration to 0 will not disable that
duration -- it
> will treat it as $FFFF+1.
Hmmm, ok... but $FFFF+1 = 0 in the 16 bit world, no?
When the PAK8 gets this for, say, the high duration, will it actually
put out zero time steps at high, and then the specified number of low
steps? I.e., all low?
BTW: Easy enough to figure out, but I'm waiting for mine to come in
the mail from P'lax.
BTW#2: Thanks Parallax for hosting all this AWC chatter, it's very
useful to Stampers!
PM
Well, this is common in looping software. It depends on where you do the
test. For example, imagine a byte variable:
x var byte
x=0
loop:
x=x-1
if x<>0 then loop
go_on:
First time through, x=0, yes, but when you subtract 1, you get $FF which is
not 0 and so the loop continue 255 more times.
Regards,
Al Williams
AWC
* Floating point A/D
http://www.al-williams.com/awce/pak9.htm
>
Original Message
> From: Pat Matthews [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=FJWkdnB22T42W654v6FmPARqPt-3PL265_uKzGBI18oNsWx6PKKG9GpN8RPm8IOIzEepUTZUn8l1Z7Ed]patmat2350@a...[/url
> Sent: Monday, October 29, 2001 11:27 AM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Re: PAK VIII and PWM (hello Al!)
>
>
> --- In basicstamps@y..., "Al Williams" <alw@a...> wrote:
> > Hi Pat,
> ...
> > If I recall, setting the duration to 0 will not disable that
> duration -- it
> > will treat it as $FFFF+1.
>
>
> Hmmm, ok... but $FFFF+1 = 0 in the 16 bit world, no?
>
> When the PAK8 gets this for, say, the high duration, will it actually
> put out zero time steps at high, and then the specified number of low
> steps? I.e., all low?
>
> BTW: Easy enough to figure out, but I'm waiting for mine to come in
> the mail from P'lax.
> BTW#2: Thanks Parallax for hosting all this AWC chatter, it's very
> useful to Stampers!
> PM
>
>
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
> Subject and Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
Moral: Avoid "duration = 0", use the force high/force low functions.
PM
--- In basicstamps@y..., "Al Williams" <alw@a...> wrote:
> Hi Pat,
>
> Well, this is common in looping software. It depends on where you
do the
> test. For example, imagine a byte variable:
>
> x var byte
>
> x=0
>
> loop:
> x=x-1
> if x<>0 then loop
> go_on:
>
>
> First time through, x=0, yes, but when you subtract 1, you get $FF
which is
> not 0 and so the loop continue 255 more times.
>
> Regards,
>
> Al Williams
> AWC
> * Floating point A/D
> http://www.al-williams.com/awce/pak9.htm