Trying to figure out how to exactly set up a seven-segment display?
Trying to figure out how to exactly set up a seven-segment display?
I'd say google and see what you find, and consider that the bits of one unsigned char can handle the on and off state of all 7 segments, with one to spare. A simple mask and logical bit operator and you should be good to go.
If you haven't already searched on the forum, I'd do that, as well.
This is a thread (and my novelty program), that handles 7 segment displays. I wouldn't say it was serious, or what your teacher might be looking for, however. (No bit masking, but it shows how to print up a 7 segment display on a console window.)
seven-segment devices - Software Design and Algorithms