- Discrete LEDs
- Dot/Bar LEDs
- Matrix LEDs
- 7-Seg LEDs
- LCDs
- Switches
- KBDs
- Sensors
- Motors
- Analog
-
Comm
- Serial -- Software
- Serial -- Hardware
- RS-232 via the MAX3232
- I2C -- EEPROM
- I2C -- DS1307 Real Time Clock
- 1-Wire -- DS18B20, Powered, Single-Drop
- 1-Wire -- DS18B20, Powered, Multi-Drop
- 1-Wire -- DS18B20, Parasitic, Multi-Drop
- TI Link Protocol -- Calculator Demo
- Infrared Communication
- MIDI -- Output Demo
- MIDI -- Input Demo
- MIDI to Analog Synth
- Miscellaneous
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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment