16F684 and PWM

Started by Dave Mucha February 7, 2004
Hi All,

I was looking over the data sheet for the 16F684 and it lists that it
has 4 channels of PWM. I'm assuming that it means 4 seperate
channels of hardware PWM.

The layout of the chip shows one CCP1 module so it would appear that
it can only have one hardware PWM.

I'm in a little over my head so can you offer just a litte more
than 'read the data sheet' been there and I'm confused. (telling me
to scour Microchips site for app notes on PWM would be fine.....)

Dave



> I was looking over the data sheet for the 16F684 and it lists that it
> has 4 channels of PWM.

The chip has one PWM. Where exactly does it say that it has 4?

Wouter van Ooijen

-- -------
Van Ooijen Technische Informatica: www.voti.nl
consultancy, development, PICmicro products




It has one PWM with up to 4 outputs available for driving push-pull
circuits. Starting at page 63 of the data sheet. --- Dave Mucha <> wrote:
> Hi All,
>
> I was looking over the data sheet for the 16F684 and it lists that it
>
> has 4 channels of PWM. I'm assuming that it means 4 seperate
> channels of hardware PWM.
>
> The layout of the chip shows one CCP1 module so it would appear that
> it can only have one hardware PWM.
>
> I'm in a little over my head so can you offer just a litte more
> than 'read the data sheet' been there and I'm confused. (telling me
> to scour Microchips site for app notes on PWM would be fine.....)
>
> Dave >


=====
My software has no bugs. Only undocumented features.

__________________________________




----- Original Message -----
From: Dave Mucha <>
To: <>
Sent: Saturday, February 07, 2004 5:26 PM
Subject: [piclist] 16F684 and PWM > Hi All,
>
> I was looking over the data sheet for the 16F684 and it lists that it
> has 4 channels of PWM. I'm assuming that it means 4 seperate
> channels of hardware PWM.
>
> The layout of the chip shows one CCP1 module so it would appear that
> it can only have one hardware PWM.
>
> I'm in a little over my head so can you offer just a litte more
> than 'read the data sheet' been there and I'm confused. (telling me
> to scour Microchips site for app notes on PWM would be fine.....)
>
> Dave

Hi Dave,

Looking at the data sheet it seems that this chip has *one* PWM which can
drive 4 outputs. These 4 outputs are not idependent of each other, they are
tied together in such a way as to drive *one* H-bridge motor circuit. If you
were thinking of using the 4 outputs to drive 4 seperate RC servos, forget
it.

Regards
Sergio Masci

http://www.xcprod.com/titan/XCSB - optimising structured PIC BASIC compiler



--- In , "sergio masci" <smypl@x> wrote:
>
> ----- Original Message -----
> From: Dave Mucha <davemucha@j...>
> To: <>
> Sent: Saturday, February 07, 2004 5:26 PM
> Subject: [piclist] 16F684 and PWM > > Hi All,
> >
> > I was looking over the data sheet for the 16F684 and it lists
that it
> > has 4 channels of PWM. I'm assuming that it means 4 seperate
> > channels of hardware PWM.
> >
> > The layout of the chip shows one CCP1 module so it would appear
that
> > it can only have one hardware PWM.
> >
> > I'm in a little over my head so can you offer just a litte more
> > than 'read the data sheet' been there and I'm confused. (telling
me
> > to scour Microchips site for app notes on PWM would be fine.....)
> >
> > Dave
>
> Hi Dave,
>
> Looking at the data sheet it seems that this chip has *one* PWM
which can
> drive 4 outputs. These 4 outputs are not idependent of each other,
they are
> tied together in such a way as to drive *one* H-bridge motor
circuit. If you
> were thinking of using the 4 outputs to drive 4 seperate RC servos,
forget
> it.
>
> Regards
> Sergio Masci
>
> http://www.xcprod.com/titan/XCSB - optimising structured PIC BASIC
compiler
Yup, I was hoping for 4 independant hardware PWM's and only saw the
one CCP1 module. I was hoping that they put 4 pwm's on the data
sheet because there was some way to get something for nothing.....

Thanks guys,

Dave


--- In , "Wouter van Ooijen" <wouter@v...>
wrote:
> > I was looking over the data sheet for the 16F684 and it lists
that it
> > has 4 channels of PWM.
>
> The chip has one PWM. Where exactly does it say that it has 4?
>
> Wouter van Ooijen
>
> -- -------
> Van Ooijen Technische Informatica: www.voti.nl
> consultancy, development, PICmicro products


Hi Wouter,

I searched the matrix on Microchip, selected FLASH, then 4 PWM and
that was the chip that came up.

Here is a section of text from their site:
http://www.microchip.com/1010/pline/picmicro/category/embctrl/8kbytes/
devices/16f684/index.htm

"Summary
The Low Pin-count (14) PIC Flash microcontroller products
offer ....Standard analog peripherals include up to 8 channels of 10-
bit A/D, ....The ECCP peripheral offers up to four outputs with
programmable dead band delay and auto-shutdown and restart options." Page three of the data sheet says ;
http://www.microchip.com/download/lit/pline/picmicro/families/16c6xx/4
1202a.pdf " 10-bit PWM with 1,2 or 4 output channels, programmable "dead
time ",max frequency 20 kHz "

Like I mentioned, I'm not sure what they mean. Dave



also, the data sheet is very unclear until you take a fairly in-depth
reading of it. If I weren't familiar with the PIC PWM, it would have
taken a while to puzzle it out.

Phil

--- In , "Dave Mucha" <davemucha@j...> wrote:
> --- In , "Wouter van Ooijen" <wouter@v...>
> wrote:
> > > I was looking over the data sheet for the 16F684 and it lists
> that it
> > > has 4 channels of PWM.
> >
> > The chip has one PWM. Where exactly does it say that it has 4?
> >
> > Wouter van Ooijen
> >
> > -- -------
> > Van Ooijen Technische Informatica: www.voti.nl
> > consultancy, development, PICmicro products > Hi Wouter,
>
> I searched the matrix on Microchip, selected FLASH, then 4 PWM and
> that was the chip that came up.
>
> Here is a section of text from their site:
>
http://www.microchip.com/1010/pline/picmicro/category/embctrl/8kbytes/
> devices/16f684/index.htm
>
> "Summary
> The Low Pin-count (14) PIC Flash microcontroller products
> offer ....Standard analog peripherals include up to 8 channels of
10-
> bit A/D, ....The ECCP peripheral offers up to four outputs with
> programmable dead band delay and auto-shutdown and restart options." > Page three of the data sheet says ;
>
http://www.microchip.com/download/lit/pline/picmicro/families/16c6xx/4
> 1202a.pdf > " 10-bit PWM with 1,2 or 4 output channels, programmable "dead
> time ",max frequency 20 kHz "
>
> Like I mentioned, I'm not sure what they mean. > Dave