Click on our menu buttons immediately below to find MegaSquirt® information quickly:



Click here for MegaSquirt® MegaManual™ Information, Guides, and Links

MegaShift™ 7-Segment Gear Display

MegaShift™ v2.004+ code allows the user to set the state of the four gear indicator LEDs. Instead of using these outputs to drive discrete LEDs, you can use them to drive a 7-segment LED (or LCD) to display the current gear numerically.

To do this, you will need to construct a circuit using a 7-segment LED, a driver IC, and several resistors (on a proto board or something similar). Examples of such components are:

  1. 7-Segment LED: Digi-Key 160-1576-5-ND, $0.88 each.
  2. 4511 driver chip: Digi-Key 568-3124-5-ND, $0.61 each.

This is how these components should be connected:

The R1 to R7 resistors must be chosen to limit the current to 10 milliamps (the maximum for the 4511 chip). ~2.1 Volts are dropped in the LED itself.

1/8 Watt resistors are fine, but ¼W won't hurt either.

Note that the LED circuits on the GPIO board provide a ground for the LEDs. As a result, the circuits are grounded when "on", and 'floating' when "off". To provide a signal to the 4511 chip, these inputs must pull-up circuits. This is done by connecting each input to the supply voltage through a 1.0 KΩ resistor (R8 to R11 in the diagram). 1/8 Watt resistors are fine, but ¼W are good too.

Note that when connected like this with a pull up:

  • "on" in the tuning software is "low" at the 4511 input pin (i.e. the pull-up voltage is pulled low by the GPIO's conducting transistor), and
  • "off" is "high" at the input pin.

    So for example, first would be set as:

    Then you configure the remaining LED outputs to give the appropriate number in each gear:

    Value
    Displayed
    D1
    D2
    D3
    D4
    0 "on""on""on""on"
    1 "off""on""on""on"
    2 "on""off""on""on"
    3 "off""off""on""on"
    4 "on""on""off""on"
    5 "off""on""off""on"
    6 "on""off""off""on"
    7 "off""off""off""on"
    8 "on""on""on""off"
    9 "off""on""on""off"
    blank "off""on""off""on"

    Click on the component links to the respective datasheets above for a complete explanation.

    For neutral or park, 0 is an obvious choice. For reverse gear, you can use any number not already used for a gear, or you could blank the display. The display can be user-set to flash in reverse (you set two patterns - one can be blank - and the LEDs will alternate between them once per second).

    Note the the decimal point ("DP" - pin #4 of the 7-segment display) is not connected. You could use one of the spare ports to signal some function using that LED, or you could tie it into the TCC output (with a resistor) to signal the TCC status.



    MegaSquirt®, MicroSquirt® and MegaShift™ controllers are experimental devices intended for educational purposes.
    MegaSquirt® and MicroSquirt® controllers are not for sale or use on pollution controlled vehicles. Check the laws that apply in your locality to determine if using a MegaSquirt® or MicroSquirt® controller is legal for your application.
    © 2010 Bruce Bowling and Al Grippo. All rights reserved. MegaSquirt® and MicroSquirt® are registered trademarks. This document is solely for the support of MegaSquirt® boards from Bowling and Grippo.