Frequency first.
I will not go lower than this but I like to ask, should I choose to make the beep louder (over time , if found too low) I would need to increase this value. Questions is, will an increase ( not above 250us) affect any other part after finishing the code at 150us ?
Depending on what you said I calculated the interrupts per cycle to 208us giving me 2.403KHz...WOW ! this thing is loud.. .too loud. . Sooo 200us ...still loud. Found 150us to be enough. So I will stick to it.First though, I would adjust the TMR0 interrupt time to give you the sound frequency you want. Two interrupts per cycle; 250us is a period of 500us for a frequency of 2000Hz. 3800 Hz is doable with a higher interrupt rate 131usec (131Tcyc at 4MHz) or whatever you decide to use. The PWM and beep flasher will follow along
I will not go lower than this but I like to ask, should I choose to make the beep louder (over time , if found too low) I would need to increase this value. Questions is, will an increase ( not above 250us) affect any other part after finishing the code at 150us ?
Last edited: