Microcontroller › 8051 › why switch case is required? › Hi Ashish,There are 9 cases
December 26, 2014 at 12:18 pm
#12461
Participant
Hi Ashish,
There are 9 cases and the current value of ‘c’ decides which case should get executed. Inside each case there is a code to display a digit, like P0=0xB0;. The first case is for the digit ‘1’, second case for the digit ‘2’ and so on.
The value of c gets counted up in the external interrupts ISR.