Kunal2
Junior Member level 3
Dear friends
I am doing a project where i need to measure the speed of my motor shaft. I am using a rotary optical encoder which will give a 0 logic level each time one of the 8 slots cuts the light beam. This output will enter a PIC 16F877 micro-controller. I need to do programming in mikroBasic to calculate the speed. I have a few vague ideas. Can you please help me to guide me towards the development of the program?
Proposed schema:
1. Input signal from sensor in pic
2. start internal timer of PIC
3. count pulses for a specific time
4. calculate speed
My problem also in how to start the internal time of the PIC. Kindly help me.
Relying on your usual cooperation.
Thanks
Kind regards
Kunal
I am doing a project where i need to measure the speed of my motor shaft. I am using a rotary optical encoder which will give a 0 logic level each time one of the 8 slots cuts the light beam. This output will enter a PIC 16F877 micro-controller. I need to do programming in mikroBasic to calculate the speed. I have a few vague ideas. Can you please help me to guide me towards the development of the program?
Proposed schema:
1. Input signal from sensor in pic
2. start internal timer of PIC
3. count pulses for a specific time
4. calculate speed
My problem also in how to start the internal time of the PIC. Kindly help me.
Relying on your usual cooperation.
Thanks
Kind regards
Kunal