gnupic: CCP in compare mode problem with PIC16F877
Subject:
Re: CCP in compare mode problem with PIC16F877
From:
Ulrich Dziergwa ####@####.####
Date:
9 May 2002 08:22:11 -0000
Message-Id: <3CDA21D0.6A225BA@web.de>
Hi Massimiliano
massimiliano ruggeri wrote:
>
> Hi All,
> I have a question related to CCP modules in PIC 16F877.
>
> There is someone that use CCP modules in compare mode?
>
> I have tried to use CCP1 and CCP2 in compare mode, using
> TIMER1.
> My problem is to generate a PWM with a low period,
> impossible to reach using PWM mode and prescaler, also with a 4 MHz
> clock (and also I have a 5 K flash program, and dynamics at 1ms, then I
> would
> use a 20 MHz clock!!!).
> The frequency would be approximately 100 Hz or less.
> Then, fantastic compare mode feature, perfect for me!
>
---------snip--------
I haven't used the CCP module, but i have generated two PWM signal for
two motors at about 100 to 250 Hz in Software. TMT0 delivers an
interrupt on a fixed frequency, and the real PWM is generated by
software. With 10 MHz clock (thats what I use), there is enough time to
do much more in the interrupt handler, that can only get better on 20
MHz.
Best regards
Ulrich Dziergwa