All you need to do is count the number of pulses from the sensor, that you get in a fixed amount of time, say 100msec. Multiplied by 600 that will be the motor's rpm.
One way to do this is to connect the sensor output to a counter input on the PIC. Then, you read the counter at the begining of the timing period and then 100msec later. Subtract the two readings and you get the number of pulses in 100msec.
Thanks vvv and IanP.
What signal conditioning/comparator ( r they same?) should I use to get clean logic signal from hall sensor?
It should be compact like a single ic chip.
Some hall sensors have built-in Schmitt-gates, but if you are not sure about your sensor use 4093 Schmitt-NAND gate(s) or 74HC14 inverters between the sensor and the PIC..
All you need to do is count the number of pulses from the sensor, that you get in a fixed amount of time, say 100msec. Multiplied by 600 that will be the motor's rpm.
One way to do this is to connect the sensor output to a counter input on the PIC. Then, you read the counter at the begining of the timing period and then 100msec later. Subtract the two readings and you get the number of pulses in 100msec.
Can I use the counter and timer both at the same time for this?
The timer0 acts as counter so how will it measure time simultaneously?
I know the asm language but having problem conceiving the flowchart.
Btw how do you start a project?First make a flowchart or something or simply take a shot at code.
Do I need to take some care for measuring high speed of my brushless motor.It can easily go upto thousands of rpm...~18,000