Specifications

mikroElektronika | Free Online Book | PIC Microcontrollers | Appendix B: Examples
Digits to display Display Segments
dp a b c d e f g
0 0 1 1 1 1 1 1 0
1 0 1 1 0 0 0 0 0
2 0 1 1 0 1 1 0 1
3 0 1 1 1 1 0 0 1
4 0 0 1 1 0 0 1 1
5 0 1 0 1 1 0 1 1
6 0 1 0 1 1 1 1 1
7 0 1 1 1 0 0 0 0
8 0 1 1 1 1 1 1 1
9 0 1 1 1 1 0 1 1
In addition to digits from 0 to 9, there are some letters- A, C, E, J, F, U, H, L, b, c, d, o, r, t- that can be also displayed
by means of the appropriate masking.
In the event that the common anode displays are used, all ones contained in the previous table should be replaced by
zeros and vice versa. Additionally, NPN transistors should be used as drivers as well.
OPTOCOUPLER
An optocoupler is a device commonly used to galvanically separate microcontroller electronics from any potentially
dangerous current or voltage in its surroundings. Optocouplers usually have one, two or four light sources (LED diodes) on
their input while on their output, opposite to diodes, there is the same number of elements sensitive to light
(phototransistors, photo-thyristors or photo-triacs). The point is that an optocoupler uses a short optical transmission path
to transfer a signal between elements of circuit, while keeping them electrically isolated. This isolation makes sense only
if diodes and photo-sensitive elements are separately powered. In this way, the microcontroller and expensive additional
electronics are completely protected from high voltage and noises which are the most common cause of destroying,
damaging or unstable operation of electronic devices in practice. The most frequently used optocouplers are those with
phototransistors on their outputs. Additionally, optocouplers with internal base-to-pin 6 connection (there are also
optocouplers without it), the base may be left unconnected.
http://www.mikroe.com/en/books/picmcubook/appb/ (10 of 54)5/3/2009 11:36:02 AM