PIC18 CCP

Started by Eirik Karlsen May 26, 2005
Hi,
I think I have the answer to this question but I ask just to be sure.

PIC18F4520:
I need to:
Output two 8bit PWM 's (50Hz - 100's Khz usable)
Measure one PWM input (500uS - 100mS)
Measure two FRQ inputs (5Hz - 5Khz)

All of these must be done repeatedly at a minimum of 20Hz.

Now the problem is that nost of the nifty timing hardware share just
two port pins, CCP1 and CCP2 (or rather there are few CCP's).
The two PWM outputs are really simple, but they alone will
occupy both CCP pins so there are no inputs left for the
PWM input and the two FRQ inputs as I was thinking of using
Capture for PWM and FRQ measurements.

Am I correct in that the PIC can't handle all 5 of these tasks at once?
 
 
 
 

--
*******************************************
VISIT MY HOME PAGE:
<http://home.online.no/~eikarlse/index.htm>
LAST UPDATED: 23/08/2003
*******************************************
Regards
Eirik Karlsen
 

Forgot to mention that I want to avoid external multiplexing.
The two PWM outputs could be implemented in software
thereby freeing both CCPs. One of those could then be used
with an external multiplexer to measure the PWM and FRQs...
 

Eirik Karlsen wrote:

Hi,
I think I have the answer to this question but I ask just to be sure.

PIC18F4520:
I need to:
Output two 8bit PWM 's (50Hz - 100's Khz usable)
Measure one PWM input (500uS - 100mS)
Measure two FRQ inputs (5Hz - 5Khz)

All of these must be done repeatedly at a minimum of 20Hz.

Now the problem is that nost of the nifty timing hardware share just
two port pins, CCP1 and CCP2 (or rather there are few CCP's).
The two PWM outputs are really simple, but they alone will
occupy both CCP pins so there are no inputs left for the
PWM input and the two FRQ inputs as I was thinking of using
Capture for PWM and FRQ measurements.

Am I correct in that the PIC can't handle all 5 of these tasks at once?
 
 
 
 

--
*******************************************
VISIT MY HOME PAGE:
<http://home.online.no/~eikarlse/index.htm>
LAST UPDATED: 23/08/2003
*******************************************
Regards
Eirik Karlsen
 

to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

--
*******************************************
VISIT MY HOME PAGE:
<http://home.online.no/~eikarlse/index.htm>
LAST UPDATED: 23/08/2003
*******************************************
Regards
Eirik Karlsen
 

PIC18F6620 has no less than 5 CCP modules, and
two USARTs, and one SPI...
Excellent... I need all of these!!
 

Eirik Karlsen wrote:

Hi,
I think I have the answer to this question but I ask just to be sure.

PIC18F4520:
I need to:
Output two 8bit PWM 's (50Hz - 100's Khz usable)
Measure one PWM input (500uS - 100mS)
Measure two FRQ inputs (5Hz - 5Khz)

All of these must be done repeatedly at a minimum of 20Hz.

Now the problem is that nost of the nifty timing hardware share just
two port pins, CCP1 and CCP2 (or rather there are few CCP's).
The two PWM outputs are really simple, but they alone will
occupy both CCP pins so there are no inputs left for the
PWM input and the two FRQ inputs as I was thinking of using
Capture for PWM and FRQ measurements.

Am I correct in that the PIC can't handle all 5 of these tasks at once?
 
 
 
 

--
*******************************************
VISIT MY HOME PAGE:
<http://home.online.no/~eikarlse/index.htm>
LAST UPDATED: 23/08/2003
*******************************************
Regards
Eirik Karlsen
 

to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

--
*******************************************
VISIT MY HOME PAGE:
<http://home.online.no/~eikarlse/index.htm>
LAST UPDATED: 23/08/2003
*******************************************
Regards
Eirik Karlsen