| Swordfish Library - 7 Segment Display (Multiple) |
|
|
| Saturday, 04 April 2009 07:46 | |
|
Library Downloads for this tutorial
Pre-Notes:
For a brief overview on how a 7 segment display works, see the single 7 segment display example. Controlling multiple displays does add a new challenge to the situation, specifically the pin count required.
Note the PIC's power supply/oscillator are not shown
Device = 18F452 Clock = 20 #option Segments = 2 #option Segment_Port = PORTC #option Segment_1 = PORTD.4 #option Segment_2 = PORTD.5 #option DisplayInterval = 15 Include "7Seg.bas" Dim Variable As Word Variable = 0 While True DelayMS(1000) Inc(Variable) SegDisplay.Update(Variable) Wend
It is very user customizable, and can be used with single and multiple (up to 4) segment displays. Even the interval (multiplexing) speed can be modified to compensate for brightness and flickering issues due to different clock speeds. That said, the default settings allow for normal operation between 10Mhz - 20Mhz without the need to change many settings at all.
#option Segment_Port = PORTC // Segment Output Data Pins #option Segment_1 = PORTD.0 // Segment 1 Common Control Pin #option Segment_2 = PORTD.1 // Segment 2 Common Control Pin #option Segment_3 = PORTD.2 // Segment 3 Common Control Pin #option Segment_4 = PORTD.3 // Segment 4 Common Control Pin #option Segments = 4 // Number of Segment Displays in use (1 to 4) #option SingleDisplayRefreshTime = 500 // For use with single segment display #option DisplayInterval = 10 // Time that each display remains on for It should be noted that SingleDisplayRefreshTime is only for use when a single segment is used. It determines how long between update intervals for data to be displayed on the display, where as DisplayInterval is controls the time that each segment remains on while multiplexing with 2 or more displays.
Single Segment Display (link)
2 Segment Displays
4 Segment Displays
|
|
| Last Updated ( Friday, 24 April 2009 10:49 ) |
Whos Online
- Jon Chandler
- andyo
Forum Activity
REALISTIC LED candle flicker - mrdeb Wednesday, 10 March 2010 05:48 - [0 replies]
the LCD demo hello world - mrdeb Wednesday, 10 March 2010 05:41 - [29 replies]
USB problem - jon chandler Tuesday, 09 March 2010 11:31 - [3 replies]
Servo Module - andyo Tuesday, 09 March 2010 03:39 - [3 replies]
pic to ps2 communication - roshan Friday, 05 March 2010 01:30 - [7 replies]
Way Off Topic: Worldwide Ignite Week - jon chandler Wednesday, 03 March 2010 20:33 - [4 replies]
PIC USB with C and Visual C++ Project - hop Tuesday, 02 March 2010 21:49 - [0 replies]






I was thinking of battery with powered routers or powered for every...
50 rooms - wow. The XBee modules are very easy to use but I'm not ...
Thanks AndyO. What I have to do is design a device to monitor temp...
The circuit used for the remote sensor can be found here: [url]http...
plz i need help do u know from where i could download it or how cou...
hello everyone i'm trying to finish my final project and i want to ...
Thanks that was helpful
There is a BlueTooth module available. If you used this, you can s...