three separate counters
Re: three separate counters
As if i were asking about the possibility to make a vacuum tube based
pic (16fxx) ,16 ? what kind of filament voltage is that?
Hope that some one will answer.
The three counters have the same starting ,but each will stop according to a different
condition,as if you were measuring the time taken by three runners all have the same starting point ,speed but each one will stop according to different condition.
pic (16fxx) ,16 ? what kind of filament voltage is that?
Hope that some one will answer.
The three counters have the same starting ,but each will stop according to a different
condition,as if you were measuring the time taken by three runners all have the same starting point ,speed but each one will stop according to different condition.
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
Re: three separate counters
Yes it is possible to make 3 separate counters, which you can stop with an if statement like this:
The condition1, 2 and 3 variables are defined by those conditions that will stop the counter.
Code: Select all
if (condition_1)
counter1 = counter1 + 1;
if (condition_2)
counter2 = counter2 + 1;
if (condition_3)
counter3 = counter3 + 1;
//µs or ms delay
Re: three separate counters
Thank you for your reply.
If the codition signals (low =stop,high = keep counting) are introduced to three bits
of say portA should i scan those and if so how can that be made using flowcode.
The actual case is a three pulses all start at the same time but each has its own duration
which i should measure (the counting of each counter will represent pulse duration).
If the codition signals (low =stop,high = keep counting) are introduced to three bits
of say portA should i scan those and if so how can that be made using flowcode.
The actual case is a three pulses all start at the same time but each has its own duration
which i should measure (the counting of each counter will represent pulse duration).
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
Re: three separate counters
Use the input icon from Flowcode to read each input on PORTA and yes you'll need to scan them (called the "polling" method).