frequency count not work

Moderator: Benj

Post Reply
hertz89
Posts: 19
Joined: Sat Mar 22, 2014 6:30 pm
Been thanked: 3 times
Contact:

frequency count not work

Post 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
Attachments
Flowcode1.fcf
(15.5 KiB) Downloaded 320 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: frequency count not work

Post 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
Martin

Post Reply