Recent Changes - Search:

Introduction to Microcontroller Programming

About PICmicro Chips

Clocking Your PICmicro Devices

E-Blocks

Flowcode Step By Step

PICmicro Projects

Labs

Using the Quad Display

<^< Using a Single digit | Course Index | Getting the Timing Right >^>

Now let's try the '7 Segment Quad' display.

Select the Outputs button and click on the '7 Segment Quad' component in the toolbar to add one to your program. A 7-segment quad display will now appear on the panel.

By default the 7-segment quad display is connected to all 8 pins on Port B, and the 'common' pins are set to Port A 0-3 (A0-A3). You can change this, but we will keep the default connections for now.

Drag a 'Component Macro' icon onto the flowchart and open up the macro dialogue box.

Scroll down the list of available macros for that component 'led_7seg_quad' and select the 'ShowDigit' macro.

The 'ShowDigit' macro for the 7 Segment Quad display is the same as that used for the 7 Segment Single display , but with an extra parameter added - Digit. Digit is used to select which of the 4 7-segment displays to show the value on. These are numbered 0-3 from left to right.

Let's display 1234 on the quad 7-segment display . Enter 0,1,0 into the parameters box and click on 'OK'. This will display the number 1 in the left-most 7-segment display. Next add 3 more macros with 1,2,0 2,3,0 and 3,4,0 in respectively.

Now run the program, this works fine in simulation, but what about running the program on hardware? What happened? We sent the correct digit to all four 7-segments, but only the last one is lit.

If you were observant, or had the program running slowly you might have seen what happened. Basically the first 7-segment display lit, then the next, then the next, then the last one. The problem is that unlike the LCD we can't light more than 1 7-segment display at any one time.

How do we get around this? We'll find out on the next page, but why not think for a minute how you might solve the problem?

<^< Using a Single digit | Course index | Getting the Timing Right >^>

Print - Search - Login

Page last modified on May 14, 2013, at 03:29 PM