Below is an illustration of how the pins on the MCU development board are connected to the seven segment display. Just as in base 10 (the number system you're used to counting in), you consider the significance from left to right, however, number places are counted from right to left. In base 10, the number just to the left of the deciaml is the ones place, to the left of that is the tens place, to the left of that is the hundredths place, and so on. The same is true for binary.
Note: Keep in mind that you will want to connect a resistor (100 Ohm) either between each of the anode ends of the LEDs and their pins on the dev board, or you can connect a single resistor between the common cathode and ground on your board (recommended).


This pin configuration is simply the one I chose. If you connect your pins to the segments in a different order than I did, then your hex values will be different to control which number is being displayed. In the illustration, there are three example numbers that show how this is working. If pins 0-3 and 5 and 6 are on, you get a six. If pins 3 and 4 are on, you get a one, and so on. Getting the right number is just a matter of turning on the correct segments, and consequently turning off all of the others.

Port Pins In Action
In the controls below, imagine that you are turning on and off the port pins in your code. When you click any one of the check boxes below, its corresponding LED will turn on. You can then see what the binary number is for you to set at your port in order to display that number. Keep in mind that the numbers you want to display do not correspond in any way with the number your using to display it. To display a six for instance, pins 0, 1, 2, 3 5, and 6 all need to be highlighted. When you turn all of those on, look at the row labelled "On/Off". The one and zeros on that line make up the binary number that you will use. You can then see its hexadecimal and decimal equivalents. You will set your port port in code equal to the hex version of the number.

Port 1
Pins P1.7 P1.6 P1.5 P1.4 P1.3 P1.2 P1.1 P1.0
 
On/Off
Hex Value
Decimal Value

    P1.5    
       
P1.0
P1.6
P1.4
       
P1.1 P1.3
       
    P1.2    
Note: Notice that port pin 1.7 is not used in the seven segment display. It is only included here to show that there are 8 bits in the port. This pin could very well be utilized by some other peripheral. You may safely ignore it since it isn't actually connected to anything.


In your code you would simply set the entire port equal to the hex value for whatever number you want as below:

P1 = 0x6F;

Speaking of code. Here is the source code for this example as I compiled it for my SiLabs CF8051020 development board.