Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How do I get 3kHz signal?

Status
Not open for further replies.

VRL_15

New Member
How do I get 3kHz signal?

--------------------------------------------------------------------------------

I am using PIC 16f887

I have a timer of 10ms .

I want to obtain 3Khz signal using this timer.

If anyone has an idea please let me know

Thank you
 
10ms means it overflowing at a rate of 100HZ. What kind of signal are you trying to create?

If it were to overflow 3k times a second, you'd need a period of 333.33333 usecs, not counting overhead.
 
I agree with you

Actually I need 3kHz signal for sound

I want to know if I can use the timer of 10 ms for getting that particular frequency

Thanks for your opinion
 
With a 8mhz osc
Take timer0 and set Prescale value 1:2
Preload TMR0L 106

And let it toggle a port pin on event
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top