Airmaster86
New Member
Hi,
Ive recently started with PIC microcontrollers, and now Im building/programming a digital speedometer using the PIC16F84A. Im new to the whole thing programming pics, so I got some questions.
I use C to program PICs as im familiar with C++.
I want to count the time for one revolution of the wheel then calculate the speed. As I want the PIC to jump directly to the "timing-function" when the signal goes high (from the wheel-sensor), I thought that I could use the Interrupt pin on the PIC. When the signal goes high again (one revolution later..) it will stop counting. The problem is that I do not know how to solve this, and if there is functions for rising edge and interrupts.
If there is someone that would like to help me I would be very happy and thankful.
Thanks,
Anders
Sweden
Ive recently started with PIC microcontrollers, and now Im building/programming a digital speedometer using the PIC16F84A. Im new to the whole thing programming pics, so I got some questions.
I use C to program PICs as im familiar with C++.
I want to count the time for one revolution of the wheel then calculate the speed. As I want the PIC to jump directly to the "timing-function" when the signal goes high (from the wheel-sensor), I thought that I could use the Interrupt pin on the PIC. When the signal goes high again (one revolution later..) it will stop counting. The problem is that I do not know how to solve this, and if there is functions for rising edge and interrupts.
If there is someone that would like to help me I would be very happy and thankful.
Thanks,
Anders
Sweden