Maker Pro
Maker Pro

pic micro programming

E

eddie

Jan 1, 1970
0
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
 
K

krw

Jan 1, 1970
0
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
Sure. There is a <shift> key at each bottom, outside corner of your
keyboard. You might try a spelling checker too.
 
R

Rich Grise

Jan 1, 1970
0
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

The teacher?

Good Luck!
Rich
 
A

Anthony Fremont

Jan 1, 1970
0
eddie said:
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

You can do this two ways:

1) you can count pulses over a measured time interval (using a timer)
or
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.
 
J

Jamie

Jan 1, 1970
0
Anthony said:
You can do this two ways:

1) you can count pulses over a measured time interval (using a timer)
or
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.
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!
 
E

eddie

Jan 1, 1970
0
You can do this two ways:

1) you can count pulses over a measured time interval (using a timer)
or
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.

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

eddie

Jan 1, 1970
0
Sure. There is a <shift> key at each bottom, outside corner of your
keyboard. You might try a spelling checker too.

If you are so smart how comes you dont realize that am not asking help
for some minor Grammatical error.
 
A

Anthony Fremont

Jan 1, 1970
0
eddie said:
The minimum rpm i want to desplay on my Lcd is 400 and maximum is
1500.
I want to time every 2second

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?
 
K

krw

Jan 1, 1970
0
If you are so smart how comes you dont realize that am not asking help
for some minor Grammatical error.
Well, since you asked... I gave help where it was most needed.
 
Top