I found this awesome code generator for seven segments. There are many out there but this one has some good features. first of all you can decide which Segment is attached to which pin [all pins should be on one port]. secondly you can get values for multiple characters and the code generator will make an array of values for you .
Give it a try. It can be downloaded here or from codeplex website.