Page 1 of 1

frequency count not work

Posted: Fri Apr 25, 2014 11:10 pm
by hertz89
hi
i am trying to make frequency counter..the program will count how many pulse in specific time using TMR0 then save it to variable(count1)...then repeat the operation and save to (count2) then if count1<>count2 output B1 pin..then loop..atc

when simulating with proteus it don't work...and in the reality it don't work.....help

Re: frequency count not work

Posted: Sun Apr 27, 2014 10:50 pm
by medelec35
Hi hertz89,
The issue with your flowchart is if connected to the same frequency source (which it will be if using a simulator) then count1 will always be the same as count2 therefore you will not see LEDs flash.
Unless you only want ot detect change in frequency of course.
If you have in your decision branch if timer>0 then flash LED's then you will see LED's flash when a frequency is detected.

Have you see these frequency counters:

http://www.matrixmultimedia.com/mmforum ... 74&#p41818

http://www.matrixmultimedia.com/mmforum ... 24&#p44624

http://www.matrixmultimedia.com/mmforum ... 47&#p39147

& If you have a Flowcode V6
http://www.matrixmultimedia.com/mmforum ... 26&t=14749

Martin