7-Segment Display -- Direct Drive


Now we'll turn our attention to 7-segment displays. Let's begin simply with a single-digit readout and let the software within the PIC16F88 handle the decoding. To run all seven segments along with the decimal point, directly, brings us in at 80 mA on the port lines, which is below the 100 mA max dictated by the manufacturer.


If you check out the source code, you'll see that the segment patterns are contained within a constant array stored in memory. Pascal (and PMP) is very good at handling arrays, and it's easy as hell to access them via indexing. So, this ends up being a straightforward exercise. Feel free to create any additional character patterns you might need.

Click to get the source code.
Click to get the schematic PDF.

Next Project: 7-Segment Display -- Two Digits

No comments:

Post a Comment