AN-1110 ASM Counter with display

Sometimes it may be necessary to display some digits on a 7-segment display indicator. This can be easily accomplished with a Silego GreenPAK™ SLG46531V CMIC thanks to 8-states Asynchronous State Machine (ASM) with configurable outputs for every state.

ASM Counter Circuit Design

If we use a 7-segment indicator, we need only 7 logic signals to output any digit by switching on the necessary segments. To do this we may configure 7 of 8 ASM outputs (High or Low) for each state (0..7) in such a way to display some numbers (see Figure 2, Figure 1).

ASM counter appearance

Figure 1. ASM counter appearance

To output number “1” we need to switch on segments B and C, “2” – A, B, G, E, D and so on.

Let’s connect indicators’ anodes (3 and 8 on the Figure 2) to the Vdd and control the indicator applying Low level to segments’ cathodes to switch them on and High level to switch them off.

7- segments Indicator

Figure 2. 7- segments Indicator

ASM outputs configuration and outputs: segments connection scheme is shown in Figure 4.

Such a system is able to display 8 digits: 0, 1, 2, 3, 4, 5, 6 and 7.

PIN#3 is used to switch system On/Off.

To switch ASM on we need to apply High level signal on its nReset input. After ASM reset it starts operating from the initial state (state 0 in our case).

ASM state diagram is displayed in Figure 3.

From each state we can move to the next or previous state depending on PIN#4 (Up/Down) level, so it is possible to count up or down.

ASM state transition happens on a High level input signal. If we use one button for transitions and connect it directly, we may jump over some states even if we use an edge detector.

ASM State diagram

Figure 3. ASM State diagram

That’s why it is necessary to use a circuit which consists of the DFF and LUTs and makes transitions only on the rising edge of the Button (PIN#2) pressing. Each time the Button is pressed, DFF’s output will change from High (for even states) to Low (for odd states) and vice versa. 2-L1 and 2-L2 LUTs are used to monitor DFF3 output and Up/Down – PIN#4 input. They initiate transitions from even states: 2-L1 - from lower to higher, 2-L2 – from higher to lower. 3-bit LUTs (3-L2 and 3-L3) have similar function, but in addition, they check 2-bit LUTs (mentioned above) outputs and initiate transitions from odd states: 3-L2 – from lower to higher, 3-L3 – from higher to lower.

To indicate overload, we may use a 5th input (DP) of the 7-segment display, and ASM Out 7, which isn’t used for digits’ indication. Let’s configure this output to be High in the last state (see Figure 4) and configure 3-L4 to latch High, when ASM is in the last state and DFF3 output is High, which means we tried to move into the next after the last state. This LUT will be unlatched on the Low level from the ASM Out 7 (any state except for the last one). Filter 0 is used as an inverter, because active level for this indicator is Low.

ASM RAM Configuration

Figure 4. ASM RAM Configuration

Different digits displayed

Figure 5. Different digits displayed

ASM Counter circuit design

Figure 6. ASM Counter circuit design

Conclusion

This article demonstrates one more example of Asynchronous State Machine application and how easy we can build a simple up/down counter with indication on a 7-segment display.

About the Author

Name: Yurii Shchebel

Background: Yurii Shchebel graduated from Ivan Franko Lviv National University in 2015, studying at the Department Electronics. Presently he is working with Configurable Mixed Signal ICs (CMICs), creating handmade audio amplifiers, based on ICs, transistors and vacuum tubes.

Contact: appnotes@silego.com

 

Files



See full list of Application Notes