Microcontroller › 8051 › why switch case is required? › The Seven Segment has 8 or
December 29, 2014 at 5:56 am
#12468
AJISH ALFRED
Participant
The Seven Segment has 8 or more pinouts and is connected to port0 with 8 pins. The pins should be connected to 5V or 0V in a predefined pattern to display each number.
When you write the value P0=0xF9
to port P0, the following values appears on the port pins, 11111001. 1 indicates 5V and 0 indicates 0 volt. Since the pins of seven segment are connected to this port pins, for a value of 0xF9 it will display “1”.
Similarly writing 0xA4 displays “2” and so on.