Searching \ for '[PIC]: Re: PIC as PLC modem - how to output two pr' 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=output
Search entire site for: 'Re: PIC as PLC modem - how to output two pr'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Re: PIC as PLC modem - how to output two pr'
2003\03\02@174256 by Wojciech Zabolotny

flavicon
picon face
On Sun, Mar 02, 2003 at 01:25:43PM +0100, Wojciech Zabolotny wrote:
>
> However the main problem is how to generate the square waves with the
> programmable frequency... Can it be done with the CCP module? (I need only
> one edge to be jitter free - all external circuits can be "raising slope
> triggered", so the jitter of the failing edge does not matter at all).
>
> Could it be done as follows?
> Both CCP work in "compare, set output on match" mode (0x1000).
> After each CCPxIF interrupt, the pin CCPx is reset by software, and the new
> CCPRx value is calculated as follows: (PULSE_LENx - the period of the
> square wave)
>    CCPRx = (CCPRx + PULSE_LEN) modulo 0x10000
>

Probably this method should even be used to generate a symmetric waveform, if
it is possible to change the mode "on the fly".
Just after each interrupt the mode should be chnged from 0x1000 to 0x1001,
and after the next interrupt from 0x1001 to 0x1000.
So single TIMER1 + 2 CCPs  should be able to generate two symmetric
waveforms with different frequencies and jitter-free slopes.
(however the interrupt rate will be high).
Is it correct?
--
                             Wojciech M. Zabolotny
       http://www.ise.pw.edu.pl/~wzab  <--> spam_OUTwzabTakeThisOuTspamise.pw.edu.pl

http://www.freedos.org  Free DOS for free people!

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu>

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