Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

designing a 32 bit counter

Status
Not open for further replies.

diesel

New Member
as part of a course project/assignment we have been given an assignment to design a 32 bit pulse input counter with the features given below:

1. Counter width: 32-bit
2. Counter should have a reset input. An OFF to ON transition on the ^RST input resets the pulse counter to zero.
3. Frequency of incoming pulses: 10 KHz (max)
4. Minimum pulse width: 3us. (This should take care of noise filtering and should avoid counting any pulse having pulse width lesser than 3us.)
5. Logic High voltage of incoming pulses: +5V
6. Logic Low voltage: 0V.
how can this be designed using a microcontroller? can u respond particularly to the solutions of points 3 and 4.
 
how can this be designed using a microcontroller? can u respond particularly to the solutions of points 3 and 4.

Microcontroller? With the listed specs, absolutely.

Pick a microcontroller with an edge triggered interrupt input. In the program, setup an input so it generates an interrupt on the desired edge (risng or falling edge). Verify if the pulse is still present 3usec into the interrupt service routine. A few NOPs (no -operate instructions) should be sufficient to generate the delay. After verifying the presence of the pulse, increment the 32-bit counter. If you're using an 8-bit micro, then that would be a 4-byte register array.

The main program loop can be used to constantly refresh an LED display of the 32-bit count and check the reset input.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top