Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
int flag=1;enable the external interrupt pin on which sensor is supposed to attached and write subroutine to increase the "count" at that interrupt's vector address..
regards.
int flag=1;
{
cnt++;
TCNT0=0x0ff;
flag=0;
rpm=cnt/12;
flag=1;
}
i have written this program to count the rpm will this be correct.
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ISR(){ If interrupt_flag_bit_of_mcu true count++ If count == 1000 flag = 1 } void main() { while(1) { if(flag == 1) { flag = 0; //do something } } }