105Views4Replies

Author Options:

pwm o/p pic? Answered

Dear sir,
               how to get low frequency 30.....300c/s square wave from PIC MCU ,application required to simulate a tachometer.

Comments

The forums are retiring in 2021 and are now closed for new topics and comments.
0
quatch
quatch

8 years ago

I don't know PIC, but why not just a 555? http://www.kpsec.freeuk.com/555timer.htm#astable

0
steveastrouk
steveastrouk

Answer 8 years ago

Because the stability of the output is terrible.

0
iceng
iceng

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

0
The Skinnerz
The Skinnerz

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.