Any way to have a PIC generate a 4MHz clock?

Ok, I would need to have a PIC (16F628, for instance) generate a 4MHz clock. The PIC itself would be clocked at 20MHz with a 20 MHz crystal.

Any simple way to do this?

Reply to
Guillaume
Loading thread data ...

Why not just use a packaged 4 MHz oscillator?

Reply to
John R. Strohm

If there is it's going to be some kind of PWM trick. a 20Mhz PIC is only running at 5MIPS so it would have to be totally dedicated if you can't get one of the special features to do it.

--
Ben Jackson

http://www.ben.com/
Reply to
Ben Jackson

I have used the Oscillator output pin on several CPUs (including the PIC) to drive oscillator inputs of other CPUs as well as discreet logic. Consider connecting the PICs Oscillator output to the divide-by-5 input of a 74HC90. This should yield the need 4Mhz output.

If you can work at 16-Mhz, there are oscillator modules which output a fundamental frequency (say, 16Mhz) as well as an output divided by some selectable power of two (divide-by-four to yield 4Mhz). Such oscillators are considerably more expensive than a resonator and a 74HC90, so this solution may or may not work depending on the price sensitivity of the project.

Reply to
Greg Young

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.