Hi Bob, This is exactly the kind of thing I am looking for. I will try it out. Great work and thanks all of you rgds ramana -----Original Message----- From: Bob Ammerman [mailto:RAMMERMAN@PRODIGY.NET] Sent: Friday, August 10, 2001 6:07 PM To: PICLIST@MITVMA.MIT.EDU Subject: [PIC]:need 4Mhz clock out of 16F628 Use the CCP module in PWM mode. Set the period to 1 instruction time (PR2 = 0) Set the duty cycle to 1/2 of an instruction time using the resolution extension bits. Use an Fosc of 16Mhz Now instruction clock is 4Mhz and you will get a 4MHz clock on the PWM output pin. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) ----- Original Message ----- From: "Brent Brown" To: Sent: Thursday, August 09, 2001 10:39 PM Subject: Re: [PIC]:need 4Mhz clock out of 16F628 > > Can I get the PIC (16F628) to output clock (4Mhz) . I am free to > > choose the PIC clock to 8 or 16 Mhz. rgds ramana b v > > Not sure what you mean exactly, but if you run the chip in RC > oscillator mode the OSC2 outputs osc/4. Maybe you can use an > external 16MHz oscillator feeding into OSC1 and get a 4MHz output > from OSC2. Need to check in the data sheet to see if this is allowed. > > Brent Brown > Electronic Design Solutions > 16 English Street > Hamilton, New Zealand > Ph/fax: +64 7 849 0069 > Mobile/text: 025 334 069 > eMail: brent.brown@clear.net.nz > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads