Four phase signal with 16F690

Thread Starter

cd.103a

Joined Mar 28, 2007
2
I need to make a four phase signal, I would like to be able to do this with a PIC like the 16F690.
Frequency is app 40kHz. Duty cycle and frequency is important, I need the PIC to perform other tasks as well so i need the PWM block, I dont have bandwidth in the processor to bitbang this pattern.
It is difficult to see if this operation is possible with this processor. If not any sugestions for a similar processor with this capabillity ?

The four phases have 25% duty cycle, and should be 90dgr seperated,

Illustration:
--______--______--
__--______--______
____--______--____
______--______--__

/Casper
 

Papabravo

Joined Feb 24, 2006
21,159
What you wish to do is not possible with the available hardware of the 16F690. Why not configure a PISO shift register to do the 4 phase clock gneration?
 

Thread Starter

cd.103a

Joined Mar 28, 2007
2
I need to limit the number of components on the board, one PIC plus a driver. The current solution uses a 555 and a shift register and some NAND gates to do the logic.
/Casper
 

kender

Joined Jan 17, 2007
264
You can do the 4 phase with a timer interrupt running (according to your timing diagram) at 120kHz. If your PIC is running at 40MHz, this gives you about 33 instructions per timer interrupt. Transitioning into and out of ISR will consume most of them (this somewhat depends on your C compiler, though). Although, this will not give PIC much time to do other things. IMHO, your best bet is to use external logic (possibly programmable, such as GAL).

What are you going to do with these wave forms? Where do they go? May be there's room for some systemic cleverness.
 

Papabravo

Joined Feb 24, 2006
21,159
I should have clarified my earlier response by saying that the ECCP hardware is not capable of performing this task by itself. You can certainly try using a single timer interrupt, but 33 instructions is not much time for doing the clock generation and some other useful function.
 

kender

Joined Jan 17, 2007
264
I should have clarified my earlier response by saying that the ECCP hardware is not capable of performing this task by itself.
As a side note, 68HC08 has a counter with multiple digital comparators that can toggle pins without calling the ISR. So, the task at hand is not entirely out of the realm of a lone microcontroller.

Come to think of it. It could be useful for an original poster to mirror this question on the Microchips forum and on the CCS forum.
 

Papabravo

Joined Feb 24, 2006
21,159
Absolutely. All the PIC would require is 4 CCP Modules. In fact the 80C196KC which Intel custom designed for Ford's EEC-4 electronic engine control unit had a content addressable memory which could control up to eight outputs. Scheduled events could be place anywhere in the CAM and it could be set up once and free run.
 
Top