Microcontroller › 8051 › counter help › I can give you a rough idea
May 28, 2012 at 6:32 pm
#7925
Participant
I can give you a rough idea only,
Inside your ISR,
{
static int count = 0;
if ( count < max_count )
{
count ++;
wait_variable = 1;
}
else
{
stop_timer ();
wait_variable = 0;
}
Inside your main code,
while ( wait_variable ); // will wait till wait_variable become 0;