Controlling a seven segment display
In this project you will use your PIC to display numbers on a seven-segment display.
In this example, we will be using PIC 18F4520 to control a double digit 7-segment display LTD-4708JS. A few notes about using this display is that it is only designed to display one unit at a time, so when trying to use both digits, you have to use an ISR to switch between the two digits to create the illusion that both are on simultaneously.
Now, since there are 7 segments, one would assume that you would need 7 outputs from the PIC to display 1 digit. But it is very wasteful to use outputs from the PIC for just displaying like this, so we will be using a chip (HEF 4543B) that will take 4-bits and convert it to the 7-bit output for the 7-segment display.
If you want to display a decimal, this particular 7-segment display will allow you to do so. However, it will take up another output from your PIC.
Finally, if you are planning on displaying more than one digit, you will need an extra bit for every digit that you want to display.