A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [counter]

A digital circuit that literally "counts" - it progresses through a sequence of states that are representative of some value. It need not count in a natural progression i.e. 1,2,3,4,5 etc. to be considered a counter (i.e. you can have different count sequences) each count value need not be of significance to other circuits (i.e. sometime it's sufficient that the counter counts to some value and then stops). Examples are Gray code, up/down counter.

426 questions
Filter by
Sorted by
Tagged with
403 views

How to switch between two analog outputs with a digital output?

I have a circuit with a 74ls93 counter and I want to use one of its outputs to switch between two analog output, i.e., when the output of the counter is HIGH, the output of the circuit must be V1 and ...
2k views

Realisation of asynchronous decade counter

Here is the illustration of the counter: Can you please explain in detal what happens here? Why are J and K inputs always 1 and how does CLR reset these flip-flops?
732 views

Implementing a counter in VHLD with edge triggered clear

I'm still giving my first steps learning VHDL and after a couple of days I could not yet find a solution for this problem. What I'm trying to do is to implement an LCD controller on an Altera MAX II ...
49 views

karnaugh maps simplification

I'm in the process of making a JK arbitrary sequence counter and I'm now making the k maps to get a logic equation. I was just wondering if this is allowed (looping the bits around the middle bit) as ...
198 views

CD4017 Count up to 8

I'm using a CD4017 to control 8 Mosfets. But my problem is that I only get a output from just 1 pin, this pin is random every time i power up the ic. I wired it up like that I shorted reset and ...
136 views

Looking for multi-channel event counter IC to verify switch operation

As part of a project, I'd like to test the correct operation of a set of SPST switch ICs (maybe 8 or 16 or so). Each device contains six independent switches, and they are controlled through an SPI ...
387 views

Propagation delay in asynchronous circuit

Consider the circuit shown below where delay of each flip flop is 10ns and delay of each AND gate is 5ns each. What is the total propagation delay ? My Attempt:- 1) Consider that initial state i.e ...
152 views

Dual JK Flip-Flop Toogle Feature

I'm trying to make an 8-bit Display using 4 seven segment displays being driven by a single EEPROM (like in this video). From the video, I used the design of the 555 timer and a dual JK flip-flop to ...
751 views

Having an issue connecting two 4-bit Synchronous Up Down counters

That's a Traffic Light circuit I designed on Multisim. I used 2 74LS191 Counters, 2 74LS47 Decoders, 2 Seven Segment Displays, a 555 timer and a J-K flip-flop as you see. It should count from 29 down ...
286 views

Atmel SAMC21 MCU internal oscillator based counter inaccurate

I am programming a SAMC21 for a control system and I need a milliseconds counter similar to the millis function in arduino to keep track of samples, etc. To do this I first set up a clock channel for ...
1k views

100 LED chaser with multiple LEDs on at the same time

I'm sure this has been covered but I am not finding answers to what I am looking for. Just getting back into electronics after well over a decade...so I'm a bit rusty. :) What I need is a 100 LED ...
8k views

2 Bit Synchronous circuit that operates only with clock [Q]

I am attempting to make the following digital telephony circuit by applying Time Division Multiplexing(TDM). I am having trouble figuring out how to create a 2-bit counter that counts from 0 to 3, ...
292 views

atmega32u4 configure counter in CTC mode

as pointed out in thread: atmega32u4 use Timer as souce for a counter I tried to use the generated clock of timer 4 as input for a counter1 and counter1 should fire the compare match event after 42 ...
131 views

Multiple Demultiplexers In Series

Basically I need some demultiplexers to switch between 24 outputs. The data inputs would be connected to counters for the addresses. I'm currently using 74ls138 3-8 line demultiplexers. Is this ...
13k views

Asynchronous Down Counter using D Flip Flops

After fixing my Up Counter, I'm having troubles writing structural verilog code for an Asynchronous 4-bit Down Counter using D Flip Flops. Here's the D Flip Flop code (which was tested and works): <...
96 views

frequency divider for two output frequencies

I want to make a frequency divider from flip flops that can generate two frequencies. For example, if the input frequency is fin then the output frequencies will be fin/30 or fin/35 depending on the ...
864 views

How to write a counter in verilog for debouncing an input?

I am trying to write a module counter to debounce a input coming from mechanical buttons. The module should be controlled by the 4x4 matrix button module when to start or stop debonce. This is my ...
137 views

How to find the transfer function of a frequency counter?

I am designing a mathematical model for my control systems project and in that there is this block which measures the frequency of the wave. For the practical application I fed this wave into a micro ...
359 views

Reading a 32bit IC counter on from a computer

I am working on a design to count the mechanical cycles of a piece of equipment. It has to be a 32 bit counter and be robust. I have a working prototype using a sn74lv8154 IC, configured as 32bit. ...
700 views

How to create counter with unique sequence

I have a sequence: 001, 110, 010, 001, 110, etc. Although there are 3 bits that I want to represent, only 2 are needed for states (3 states). What I get confused with, is utilizing only 2 state bits ...
1k views

Confusion over a simple 4060 LED blinker

I'm trying to build a simple LED blinker using a 4060BP binary counter, as per the following: this one http://img.bhs4.com/ca/6/ca6021e3fd1d873281438d1bf721ef4e27ceaa0b_large.jpg and (Originals here ...
676 views

johnson counter sine wave resistor network

I saw one schematic which uses an 8-bit shift reg to produce a sine wave with a resistor network. I am guessing the resistors will be voltage dividers, but how are the values calculated? I tried to ...
440 views

Count number of hours elapsed

It's been a long while since I played with circuits, I'd appreciate a sanity check of the following design; I'm trying to count the number of hours since the reset button was last pressed. Ideally it'...
273 views

giving output bits of counter to logical gates in system generator

I have a counter block in system generator which has a 3 bit output. The block is shown below: As is apparent from the figure, it's output is represented by a single line not three. I need to give ...
1k views

FPGA Input Signal measurement

How to measure input pulse signal's frequency using xilinx toolkit on matlab? Since I'm bad at coding,I use System generator on matlab. I'm doing a project, In which I'll be using a Proximity sensor ...
787 views

Issues with 4-bit counter when porting to PCB

I need help or maybe an explanation on a particular issue I am experiencing when porting a small and relatively simple circuit from a breadboard to a PCB. The circuit is for a school project used to ...
2k views

Arduino pulse counting & storing

I'm using jeenodes from jeelabs for capturing data such as temperature, light, humidity and motion. Now I am looking to capture gas and water consumption using reed switches (the meters produce x ...
266 views

4-bit Self-correcting Johnson Counter on D flip-flops

I had a task assigned by my teacher to implement self correcting Johnson Counter. The task goes this way: Design a self-adjusted 4 bit Johnson counter. Counter must be implemented on d flip flops ...
46 views

Push button counter from 0-999, but increment in 1, 4 and 6

I would like to create a push-button counter from 0-999 using 'BCD Decade Counter' and a 'BCD to 7 segment Decoder/Driver' the total of button presses will be displayed on 3 x 7 segment displays (...
263 views

Why can't I implement a frequency divider using a mux in this way?

I found an interesting interview question for FPGA engineer online - Implement a counter with Mux, so I decided to try to do that. I tried to keep it simple and so implement a counter with two bits, ...
1k views

Character '0' used but not declared for type std_logic_vector??? (Algorithm state machine)

After adding the counter to my VHDL code am getting the following error: Error (10316): VHDL error at ASM.vhd(31): character ''0'' used but not declared for type "std_logic_vector" Thank you Code: <...
1k views

Counter in verilog

i want to make a counter that increases by the value of its inputs, but i did the testbench and the output is undetermined, xxxx. Can someone tell me if there is something wrong in this code? ...
4k views

Propagation delay in case of synchronous counters

Consider 4 bit counter as shown below:- Here suppose we consider propagation delay of each flip flop =2ns and propagation delay of each AND gate is 3ns, then what will be the total propagation delay? ...
661 views

Set start number on 7490 circuit

Is it possible to make the 7490 in BCD encoded output mode (divide by 10) have a "start" state and limit its count to a certain number? What I am looking for is a way to make the 7490 start at 1 (0001)...
742 views

Measure rpm of a DC motor using two timers/counter and IR sensor (atmega 328p)

I'm trying to measure the speed of a DC motor. I have an IR speed sensor connected to the T1 pin(PD5) of an ATMega 328p. My idea is when there is a change from LOW to HIGH, a counter is incremented ...
2k views

Why use JK Flip Flops in syncronous/asyncronous binary counters rather than D flip flops?

Everywhere I encounter either asyncronous (ripple counter) binary counters or syncronous ones, the application uses JK flip flops with the J and K inputs tied together, such as described here: From ...
590 views

JK Flip-flop counter problem

I got school project and I was trying to make counter that will count in this order: 1,3,6,5,2,4 and again but there is forbidden numbers 0,7(I assign 7 to 3 and 0 to 1 see border on table). So I ...
1k views

3 bit up/down counter using 2 flip flops

Can I build a 3 bit modulo 7 counter using 2 flip flops ?, I'm thinking of using the clock as the third bit since it toggles from 1 to 0. Will that work ? edit: Found this circuit which uses two jk ...
145 views

Ring Counter Digital Works

I am having trouble with a Digtal Works Simulation of a Ring Counter. (Version 3.0.5.0, copyright Mecanique) The on-off button does not clear the flip-flops; the flip-flop to the left is always on. (...
1k views

2 bit saturating counter

I'm trying to design a 2 bit saturating counter but am very stuck in figuring out the state diagram and building the circuit from there. This is what I understand of the saturating counter so far. ...
365 views

Should we use asynchronous inputs in Moore blocks and synchronous in Mealy blocks?

Consider we have two n-bit counters CNT_A and CNT_B two n-bit unsigned comparators CMP_A, CMP_B and two n-bit binary numbers N1, N2. The counters have two inputs C, L for synchronous count and load ...
158 views

32.768 khz crystal for time base?

I'm looking for a smallest design of a frequency counter time base uses a crystal with lower frequency that can give rates of 1Hz, 10Hz, 100Hz after dividing, I intend to use it in RF circuit, the ...
365 views

Understanding critical paths

So I'm having trouble understanding critical paths. I have the following example question: Draw the critical path that shows how fast the counter can count: Delays are specified as follows: Delay ...
199 views

3 - bit Counter (repeat after each 6 clocks)

I have tried to make a counter which counts until six clock cycles and then repeats. And would like to know whether I have done all right and the counter works correct. simulate this circuit – ...
2k views

Ring counter in verilog

I have the task of designing a ring counter in verilog using shift operator. Here is the code so far along with test bench : ...
173 views

Using a Counter to Determine next MSB position in polynomial division

I am working on implementing a polynomial divider the operation is as follows: Check MSB of Numerator: if 1 XOR with Denom then shift Denom right if 0 Num is the same and Denom also shift right When ...
3k views

Sequential circuit with more than 10 LEDs

I need to build a sequential LED circuit that will have more than 10 LEDs in a sequence. The LEDs should blink only one at a time. I know I can do 10 LEDs with a 4017 decade counter easily, but I dont ...
481 views

Counting PIC18F46K20 internal clock edges using MPLAB C18?

I am trying to create a countdown timer using the PIC18F46K20 and display the time on the OLED. I have set up TIMER0 to create a delay of 1 second ( T0CON = 0b00000001 ) so the variabe intCLKsecs ...