105Views4Replies
pwm o/p pic?
Dear sir,
how to get low frequency 30.....300c/s square wave from PIC MCU ,application required to simulate a tachometer.
Dear sir,
how to get low frequency 30.....300c/s square wave from PIC MCU ,application required to simulate a tachometer.
Comments
8 years ago
I don't know PIC, but why not just a 555? http://www.kpsec.freeuk.com/555timer.htm#astable
Answer 8 years ago
Because the stability of the output is terrible.
8 years ago
You have to place a program into it
I use a tiny Basic pre-compiler
SET a PIN as OUTPUT
MAIN_LOOP:
SET PIN HIGH
PAUSE 298 ' REM 1000 is a second
SET PIN LOW
PAUSE 296 ' REM shorter time because of the goto jump
GOTO MAIN_LOOP ' REM Endless Loop
that is all you need to do with a PIC or a STAMP by Parallax.
A
8 years ago
Many microcontrollers have a timer feature that is designed to create a constant square wave output, the frequency of which is determined by how high the timer has ta count before resetting. If you look on the datasheet, there should be all the necessary information to configure the timer and calculate the correct values to get it to output the right frequency.