Research website of Vyacheslav Gorchilin
2017-11-07
All articles/PIC controllers
Assembler for 8-bit PIC controllers
Conclusion number 4-digit seven-segment indicator — LED Arduino 595
This indicator is designed to display a four-digit decimal number and has a total of 5 findings, 3 of which are informational. For such savings, he uses two 74HC595 chips, which allow to separating in time the output values for each of the discharges. When connecting to this indicator, the microprocessor uses only 3 of its port that makes it possible to use case with a small number of conclusions.
The software contains 94 lines of code (with the initiation of a mapping table tabIND and entering values in the registers of the level). It displays on the indicator following the value of "12.3 F". Any other possible values can be set programmatically according to a mapping table tabIND. It is also possible to add other special characters.
This program is written for PIC16F684but with a corresponding change of ports can be applied to any PIC microprocessor. The General principle of its construction is clear and with a little refinement, the program can deduce the number and 8-bit indicator.
Connection
The connection of the indicator to the microprocessor is quite simple and depicted in the figure on the left. As mentioned above, are utilized to control all three ports of the microprocessor. Power indicator 5B — served on its top according to the diagram output. From him and PIC is powered. The ground lead also is common.