Microcontroler for pulse counting

Status
Not open for further replies.
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.
 
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.
 
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.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…