Feature Request: Hardware Timer-Counter Component

Please add any feature requests for Flowcode version 7 here

Moderator: Benj

Post Reply
PicoPuls
Posts: 111
Joined: Wed Mar 02, 2016 11:26 am
Has thanked: 43 times
Been thanked: 22 times
Contact:

Feature Request: Hardware Timer-Counter Component

Post by PicoPuls »

Flowcode has a USB Serial component that obviously uses the UART hardware, if available.
This is just great and awesome - to simplify engineering

In the same way - using hardware timers is a complex issue.
unless you have several years of experience in processors.

I am sure you at Matrix could make a Timer-Counter Component that counts external pulses
or counts time with the internal clock, and let FlowCode make the complex configuration job

It is no need to over-specify and access all timer possibilities .
Most users would be more than happy just to have
a couple of hardware counters easily accessible
as a FC component

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Feature Request: Hardware Timer-Counter Component

Post by Benj »

Hello,

It's a good idea and should be fairly straightforward. I've added it to the todo list and will think on it. Being able to easily measure the passing of time would be very useful.

DCW
Posts: 64
Joined: Mon Sep 28, 2015 8:19 pm
Has thanked: 14 times
Been thanked: 10 times
Contact:

Re: Feature Request: Hardware Timer-Counter Component

Post by DCW »

hello Ben .. I also think a hardware timer component could be useful.. It may even help me try get through my T1G project on the 12F629.. pin3...

maybe you could even make a special addition.. to FC7 for these two chips.. 12F629 / 12F675 .. both with T1G gates on pin3..

Thanks Ben...
regards
DCW..

Docara
Posts: 315
Joined: Sun Jun 23, 2013 1:29 pm
Has thanked: 28 times
Been thanked: 61 times
Contact:

Re: Feature Request: Hardware Timer-Counter Component

Post by Docara »

Hi Ben,

I think this is a superb idea, it would be SO helpful - please please bump it up the to-do list

Additionally, whilst the present system is perfectly functional, just wondering if it might be worth while to perhaps look at the whole area of timings v oscillator frequencies countng etc etc to see if anywhere could be simplified or even some form of wizard which pulls in everything (including interrupts and spits out a flowchart box ready to be used.

Matt

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Feature Request: Hardware Timer-Counter Component

Post by Benj »

Hello,

I've been beavering away and have a new Timer component which should allow you to easily measure the passage of time. I've tested a few devices and it seems to be working reasonably well but there are bound to be some issues on some devices. I need to test other ranges, e.g. AVR, PIC32 and STARM to make sure these are compatible.
TimerComponent.jpg
TimerComponent.jpg (2.84 KiB) Viewed 6379 times
You currently need the Misc A Component pack to use the component and it is available from the Storage component category.
Timer.fcpx
(6.7 KiB) Downloaded 319 times
To add the component simply drop the file into your "Flowcode 7/components" folder and restart Flowcode.

If you have a go then let me know how you get on.

I've made an example to test the component but the drawing to the gLCD effects the minimum timings so the program probably needs a tweak to measure and then display the values.
TimerTest.fcfx
(23.09 KiB) Downloaded 326 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Feature Request: Hardware Timer-Counter Component

Post by Benj »

Here is an updated version of the component now tested compiling correctly on AVR, 16-bit PIC and 32-bit PIC.

ARM is currently a problem because the timers don't necessarily run from the same clock as the processor so currently the component does not support these devices.
Timer.fcpx
(6.86 KiB) Downloaded 308 times
I will hopefully add prescaler options soon to allow the max measurement time to be increased if needed. At the moment I default to maximum resolution so the maximum measurement time can therefore be a bit limiting.

Post Reply