• 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.

Microcontroler for pulse counting

Status
Not open for further replies.

MikeMl

Well-Known Member
Most Helpful Member
At what pulse rates?
 

wkrug

Active Member
You should Look for an Microcontroller with enough interrupt sources.
An ATtiny2313 has 8 Pin Change Interrupt sources.
The Problem is, the Interrupt will be triggered at any Change of one of the Pins.
At L->H also than at H->L change.
In the Interrupt routine you must find out witch Input Pin the Interupt has triggered and whith change L->H or H->L has occured.
Then you can Count up an Variable for that Source.

Many Controllers oft the AVR Tiny an ATMEGA series offer this Pin Change Interrupts.

INT where useful also and easyer to use, but only the biggest ATMEGA Controllers has more than 3 or 4 of this Interrupt Sources.
 

Mosaic

Well-Known Member
These pulses are digital 0-5V pulses? If not you will need to condition/isolate them before the PIC pins see them. This way a proper logic level is visible to the pins.
 

wkrug

Active Member
David has not specified the controller family.
I work most with AVR Microcontrollers.
For thoose Pulse Jobs my favorite solution are interrupts.
So wait cycles or similar has no chance to block the counting.

But you are right too. At that low frequecies polling is possible also.
 
Last edited:
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top