You can control a 7-seg with a 16F84 (18 pin). Even a lot of them. :? Also if you need more pins you can use 16F876, very similar to the other but with 28 pins and, if you want to use them, many added features.
Anyway, you have to write a table where you'll have the translation, from dec, hex or bin (whatever you like most) to 7-seg. Imagine the table like this:
head (it's not a real position, but you should know where (mem position)does the table start)
3F (if you put h'3F' or 0x3F or b'0011 1111' in your port, you'll get a '0' displayed)
06 (you'll get a '1')
5B (...)
4F
66
6D
7D
07 (you'll get a '7')
and so on...
As you know, each LED segment is called by a letter, such 'a' till 'g' (g is the segment in the middle). Ensure you assign the lower port bit to the 'a' segment and you mantain the order until you assign the port bit 7 to the 'g' segment. This way the table above works for those specific values. Otherway, you'll have to guess them, understood?
The procedure is the following:
You have your number to display, ie: 7
Locate yourself at the head of the table.
Then, force the program counter to jump 7 steps.
And ask the micro to return you the value it found there (where he arrived). In the table above, it should return you a h'07'.
Put this value in your port now: A '7' must be displayed.
What if you must control 4 7-seg modules (more than one, anyway)?
Easy! A LED can conmute fron off to on in microseconds and viceversa. All you need is one more pin for enable and disable each 7 seg block.
Once again, the global procedure:
You want to display this number: 531
Enable the first 7 seg module and disable the others.
Do as told above to display a '5'
Disable the first module and enable the second.
Display a '3'
Disable the second and enable the third
Display a '1'
Easy, isn't it?