PIC frequency divide

Status
Not open for further replies.

alifred

Member
Hi,

Could someone possible write a small bit of assembler code for me that will divide a 32.768Khz crystal (attached to a PIC 16F627) into frequencies like 330hz.

Also could you possible tell me how to change the code to divide it down into other frequencies. (all under 1Khz)

Thanks for all your help in this AMAZING forum

Fred
 
PWM is hardware a pulse generator designed for motor control built into many PICs including the 16F627. Once set it simply runs on its own till changed or stopped.
For musical tones just select 50% as your duty cycle.

Read the CCP module info in the datasheet.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…