Connect with us

pic micro programming

Discussion in 'Electronic Design' started by eddie, Mar 16, 2007.

Scroll to continue with content
  1. eddie

    eddie Guest

    i am trying to program a pic16f877 to desplay the rpm of a motor. I
    am using a sensor on the shaft to give me 4 puls per revolution. I am
    thinking of using capture and compare facility of the pic. or some
    timer . can anyone help me
  2. krw

    krw Guest

    Sure. There is a <shift> key at each bottom, outside corner of your
    keyboard. You might try a spelling checker too.
  3. Rich Grise

    Rich Grise Guest

    The teacher?

    Good Luck!
  4. You can do this two ways:

    1) you can count pulses over a measured time interval (using a timer)
    2) you can time the interval between pulses (CCP)

    What is the speed range of the motor?

    How often do you need to calculate the RPM?

    The answer to those two questions will determine the best approach.
  5. Jamie

    Jamie Guest

    You know what? I think it's very nice that you offered to help him, and
    I hope that the poster gets something out of it. Now that I have
    said that. The remainder of this reply is for some others that might
    be reading it, and you know who you are.

    I don't have anything nice to say about people that have nothing
    better to do than ridicule some one's miss spellings and maybe, incorrect
    use of a words.

    Simply put, if the message is clearly conveyed, why add insult to injury.
    The poster wasn't asking for some one to correct their spelling or
    grammar, just a little help. And I thought the message was very clear.

    If the message was not readable, then i would understand at least, for
    any one that is willing to help to simply ask them to repost it a little
    clearer with out all the other slag, negative commits and obscenities
    thrown in.

    If you feel that you must unload on some one due to a back day or
    life style? then, that is what beer and the other half is for!
  6. eddie

    eddie Guest

    The minimum rpm i want to desplay on my Lcd is 400 and maximum is
    I want to time every 2second
  7. eddie

    eddie Guest

    If you are so smart how comes you dont realize that am not asking help
    for some minor Grammatical error.
  8. The RPM is kinda low, but you could get away with counting the pulses over
    the two second update period as long as you don't need very high resolution.
    At 400 RPM, you would count 53 pulses every two seconds. At 1500 RPM, the
    count would be 200. This makes the math non-trivial since you have to
    multiply the number of pulses counted over two seconds by 7.5 to calculate
    RPM. OTOH, you can just left shift the count by three bits (multiply by 8)
    giving you an error of about 7% high. I should have asked before, how much
    accuracy and resolution do you need?
  9. krw

    krw Guest

    Well, since you asked... I gave help where it was most needed.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day