Searching \ for '[PIC]: PWM on 16F628' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=pwm
Search entire site for: 'PWM on 16F628'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: PWM on 16F628'
2002\07\12@151207 by Richard Mellina

picon face
I'm new to pics and I have a question about a project I'm working on.
I remember reading somewhere that that you can output two PWMs with
different duty cycles on the 16F628 using the CCP module. I'm not sure if
this is true or not. Any help would be appreciated.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\07\12@154533 by Dave King

flavicon
face
At 02:08 PM 12/07/02 -0500, you wrote:
>I'm new to pics and I have a question about a project I'm working on.
>I remember reading somewhere that that you can output two PWMs with
>different duty cycles on the 16F628 using the CCP module. I'm not sure if
>this is true or not. Any help would be appreciated.

Yes it does. ;-]

I was just asking about this 3 days back or so and the 628 and a few others
will do it. Same frequency, different duty cycles.... (See Roman I actually
listened ;-])

Dave

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\07\12@164710 by Herbert Graf

flavicon
face
> > I'm new to pics and I have a question about a project I'm working on.
> > I remember reading somewhere that that you can output two PWMs with
> > different duty cycles on the 16F628 using the CCP module. I'm
> not sure if
> > this is true or not. Any help would be appreciated.
>
> look here
> http://www.rentron.com\PIC16F628.htm

I get a DNS error on that one. Thanks, TTYL

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\07\12@164903 by Olin Lathrop

face picon face
> I'm new to pics and I have a question about a project I'm working on.
> I remember reading somewhere that that you can output two PWMs with
> different duty cycles on the 16F628 using the CCP module. I'm not sure if
> this is true or not. Any help would be appreciated.

The 16F628 only has one CCP module, so it can only produce one pure hardware
PWM output.

However, software PWM can be a reasonable alternative unless you need high
frequency.  The maximum clock frequency is 20MHz for an instruction
frequency of 5MHz and period of 200nS.  If you take an interrupt every 100
instructions to recalculate each PWM output, that gives a PWM slice time of
20uS.  Given this situation, here are some example PWM frequencies and
periods as a function of the PWM resolution in bits:

BITS      PERIOD   FREQUENCY (Hz)
  4       320uS             3125
  6      1.28mS              781
  8      5.12mS              196

These kind of speeds and resolutions are usually just fine for controlling a
DC motor or solenoid, for example.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\07\12@170201 by Bob Barr

flavicon
face
On Fri, 12 Jul 2002 16:46:45 -0400, Herbert Graf wrote:

>> > I'm new to pics and I have a question about a project I'm working on.
>> > I remember reading somewhere that that you can output two PWMs with
>> > different duty cycles on the 16F628 using the CCP module. I'm
>> not sure if
>> > this is true or not. Any help would be appreciated.
>>
>> look here
>> http://www.rentron.com\PIC16F628.htm
>
>I get a DNS error on that one. Thanks, TTYL

The slash between com and PIC is backwards.

You might want to try  http://www.rentron.com/PIC16F628.htm later.
Their whole site appears to be unavailable right now.



Regards, Bob

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\07\13@103758 by Richard Mellina

picon face
Thanks for your reply. Sorry, I guess I missed the post with the answer. It
says that PICs with a CCP module allow two PWM outputs with the same
frequency, but different duty cycles. I've look at the data sheet and I
can't figure out how this could be done. I've checked application notes for
the CCP and from what I understand that only works on PICs with two CCP
modules. I got contradicting replies to my post and I'm confused. Am I
missing something here?
Thanks!
{Original Message removed}

2002\07\13@175223 by Dave King

flavicon
face
At 09:33 AM 13/07/02 -0500, you wrote:
>Thanks for your reply. Sorry, I guess I missed the post with the answer. It
>says that PICs with a CCP module allow two PWM outputs with the same
>frequency, but different duty cycles. I've look at the data sheet and I
>can't figure out how this could be done. I've checked application notes for
>the CCP and from what I understand that only works on PICs with two CCP
>modules. I got contradicting replies to my post and I'm confused. Am I
>missing something here?
>Thanks!

Richard

I am the wrong one to ask. Other than just looking at it and finding out
that it will do two pwm streams with hardware, I can't help you. A couple
of the guys who responded to my question did post some code on how to do it.
That was only a couple days ago. I think there was also a link to an
example of
code for two streams.

From what I recall both pwm 's are generated off of timer 2. So the total
pulse
time is the same but you can vary each pwm stream as to the pulse width.
So each pulse cycle is say 100ms in length but you can have one running at 10%
and the other at 100% etc.

Dave

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\07\13@193950 by driano Venturini

flavicon
face
Hi,

>The slash between com and PIC is backwards.

>You might want to try  http://www.rentron.com/PIC16F628.htm later.
>Their whole site appears to be unavailable right now.

you are right, I mistake,
between the other belongingses now is available.

Adriano
Italy

http://www.geocities.com/adriano-sar

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...