Support the Timer Calculator Project

Timer Calculator is a free software development tool used for easier calculation of timer interrupts.
Author
Message
User avatar
anikolic
mikroElektronika team
Posts: 1775
Joined: 17 Aug 2009 16:51
Location: Belgrade
Contact:

Support the Timer Calculator Project

#1 Post by anikolic » 14 Nov 2013 17:42

Support the Timer Calculator Project

Timer Calculator is a huge success. Over 12 thousand downloads and counting. It's obvious that you guys
need such a handy tool. We've decided to put the faith and the future of Timer Calculator in your own hands.

Image

Timer Calculator, like many other projects here in MikroElektronika, started as a personal enthusiasm of
one of our colleagues. In this case, Marko from Software Department. Every time he needed to write
timer interrupts he had to run through datasheets, which was annoying. Information was usually scattered
across several sections and putting all the pieces together required time. Internal test procedure also
required the use of oscilloscope to check the timings. Imagine just how painful was porting such code
between architectures. Using some existing timer code generator tools did not help much since they all
required quite a number of input parameters and a relatively good knowledge of specific timer modules.
Soon enough, Marko came with an idea: why don't we make some simple tool for generating timer
interrupt code? The idea was widely accepted and since no good idea goes unpunished, Marko got his
reward. He was assigned to design and implement such a tool for internal use, but as a low priority side
project. The tool was supposed to generate timer interrupt code with a single click using a very few input
parameters: 1. target controller, 2. operating frequency and 3. desired timer interrupt period. The rest
would be done automatically within the software. Here's how the software initially looked like:

Image

When we finally saw the results we were thrilled. This new tool had a huge impact on coding speed
for timer related projects
. Naturally, a new idea arises: This is a fairly great app, why don't we
share it with the community? Several of us gathered around Marko and started brainstorming how to
improve the software and make a bit more user friendly interface. Aleksandar from Marketing drew a
simple but effective application redesign with a clear list of steps to follow. Presets were added and better
syntax highlighter implemented in editor field. Resulting redesign looked like this:

Image

It was released on July 25th, 2012 at Libstock website. The initial release supported only 8-bit PIC
microcontroller families. Soon afterwards, developers from all over the world began asking for support of
other microcontroller families and architectures. Of course, Marko had a lot of other work and since this
application wasn't on the menu as an official project, Marko slowly began adding support for
dsPIC33/PIC24, PIC32, ARM and AVR MCUs. It took him a course of nearly year and a half.

You will decide what happens next

Today we realize that this project overgrew just one man's enthusiasm and that something needs to be
done about it. We're coming in front of the entire community with a new concept, enabling you to
take power in your hands and decide the faith and the future course of development for this tool and
possible many others yet to come. If you want it to be upgraded with new features, new presets, and
support for new microcontroller families - you can give us a heads up by contributing a small piece of the
price. Pay a dollar, three or ten, all depending on how much you think this software is valuable to you. Or
pay nothing if you don't feel like it. Anyway, we'll listen to your proposals. Your wish lists and suggestions
are welcome at the Comments section of the Timer Calculator's Libstock page.

A critical mass of your contributions is needed in order for this project to get it's rightful place. Depending
on your interests, it can become a top priority or shift up or down on Marko's task list. His current duties
may be reassigned to other developers, thus making Marko all yours - if that's what you decide :)

So, think about it for a second and rush to the newly created Timer Calculator webpage to support what
matters to you.

Yours sincerely,
MikroElektronika
Web Department Manager

Toley
Posts: 922
Joined: 03 Sep 2008 16:17

Re: Support the Timer Calculator Project

#2 Post by Toley » 14 Nov 2013 19:14

hello I think this is a good idea. I personnally already contribute a little cause I use it quite often. I just want to know if there's a target ? I mean is there a minimum goal to reach or the project will be abandonned ?
Serge T.
Learning is an endeless process but it must start somewhere!

prakob
Posts: 187
Joined: 24 Nov 2012 07:05
Location: Thailand

Re: Support the Timer Calculator Project

#3 Post by prakob » 15 Nov 2013 02:50

Hello,

This is a another great tool. Keep up to develop such a good tool and support.

PS. already make a little contribution.

MaGiK
Posts: 897
Joined: 19 Apr 2013 10:00

Re: Support the Timer Calculator Project

#4 Post by MaGiK » 15 Nov 2013 14:31

Hello there :D

Could someone please tell me which programming languages were used to make this wonderful tool?
Of course, I mean the ones other than the MikroBASIC PRO, MikroPASCAL PRO and MikroC PRO.

Best Regards
My hobby is collecting MikroElektronika products.
Gotta catch them all!

VCC
Posts: 461
Joined: 08 Jun 2009 18:31
Location: Romania

Re: Support the Timer Calculator Project

#5 Post by VCC » 17 Nov 2013 10:22

Hi,
beside the good idea of Timer Calculator, another good idea is to be able to support a project by donation, like this one.
What I see around the forum, is a problem of the same sort as timer interrupts, however a little bigger: oscillator configuration. I don't want to directly ask mikroe team, or somebody else to create a tool for oscillator configuration, but it might be an idea also. :D

Toley
Posts: 922
Joined: 03 Sep 2008 16:17

Re: Support the Timer Calculator Project

#6 Post by Toley » 17 Nov 2013 13:34

Hi VCC, for which familly you refer about oscillator configuration problem ? There is usually no code for oscillator configuration (unless you use internal oscillator) everything is done with config fuses and Mikroe's compilers uses the project editor to manage that. I don't see any way to have an external software to modify that unless Mikroe made some software modifications.
Serge T.
Learning is an endeless process but it must start somewhere!

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: Support the Timer Calculator Project

#7 Post by Dany » 17 Nov 2013 13:46

The timer calculator is a very useful tool. :D :D
I did make a small contribution to support its maintenance and extension. Congratulations with your approach!
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

VCC
Posts: 461
Joined: 08 Jun 2009 18:31
Location: Romania

Re: Support the Timer Calculator Project

#8 Post by VCC » 17 Nov 2013 18:37

Hi Toley,
thanks for asking. It looks like I forgot to give details (as usual). I was thinking both at config fuses, which are saved in the .cfg file, and additional code. In additional code, there may be settings like switch on/off the PLL or adjust the OSCTUNE register. OK, the OSCTUNE register is a luxury in this kind of software. :oops:
It looks like I'm diverting the topic and I'm sorry for that, I just want to make my idea clear, and I know others had this idea too.
For one of my projects, I wanted to set a dsPIC33EP512MU810 to its maximum frequency to get 70MIPS. Reading about the various oscillator settings from the datasheet, I ended up writing a small Delphi app to calculate the resulting CPU frequency, based on a given crystal and various register settings. You can find the application, attached to this post. The application served its purpose, so I never tested it for all possible cases and it might give erroneous results. Perhaps people with more free time than I have may take this idea further. Of course, I was thinking, in my previous post, about controllers with less complex oscillators, thus an application like this would become possible.
BTW, based on the numbers computed, I ended up writing an oscillator startup code for the HID bootloader:

Code: Select all

procedure SetOSC;
begin
  //PLLPRE := 0;
  CLKDIV.4 := 0;
  CLKDIV.3 := 0;
  CLKDIV.2 := 0;
  CLKDIV.1 := 0;
  CLKDIV.0 := 0;

  //PLLPOST := 0;
  CLKDIV.7 := 0;
  CLKDIV.6 := 0;

  //PLLDIV := 68
  PLLFBD := 68;
end;

procedure SetUSBOsc;
begin
  //use primary oscillator - 8MHz
  ACLKCON3.ASRCSEL := 1; //1= Primary Oscillator is the clock source for APLL
  ACLKCON3.FRCSEL := 0; //0= Auxiliary Oscillator or Primary Oscillator is the clock source for APLL (determined by ASRCSEL bit)
  ACLKCON3.SELACLK := 1; //1= Auxiliary PLL or oscillator provides the source clock for auxiliary clock divider

  //APLLPOST := 6  //110= Divided by 2
  ACLKCON3.7 := 1;
  ACLKCON3.6 := 1;
  ACLKCON3.5 := 0;

  //APLLPRE := 1  = N1 //001= Divided by 2       => FAREF = 4MHz (input to APLL)
  ACLKCON3.2 := 0;
  ACLKCON3.1 := 0;
  ACLKCON3.0 := 1;

  //FAVCO must be 96MHz (output from APLL)
  //FAVCO = FAIN * M / N1 = 8MHz * M / 2 = 4MHz * M
  //M = 24  => FAVCO = 4MHz * 24 = 96MHz
  ACLKDIV3 := 7; //111= 24

  ACLKCON3.ENAPLL := 1; //1= APLL is enabled, the USB clock source is the APLL output
end;
 
begin
  Delay_ms(100);
  SetOSC;
  SetUSBOsc;
To admin: if I'm too out of topic, please remove this.
Than you :D
Attachments
dsPIC33EP_OscSettings.rar
(333.01 KiB) Downloaded 1257 times

MaGiK
Posts: 897
Joined: 19 Apr 2013 10:00

Re: Support the Timer Calculator Project

#9 Post by MaGiK » 20 Nov 2013 08:19

Hi guys :D

Could you please tell me which programming language was used to make this tool?
I'd also like to know which programming language was used to make the example of the (Click USB adapter) board (linked below)
http://www.mikroe.com/click/usb-adapter/

Were they made using a Visual studio program? If yes, which one please?

Many thanks in advance :D
Best Regards
My hobby is collecting MikroElektronika products.
Gotta catch them all!

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: Support the Timer Calculator Project

#10 Post by marina.petrovic » 20 Nov 2013 13:57

Hi,

Timer Calculator software is written in Delphi.

Application for click USB adapter is written in Visual Studio 2010 Express and LibMPSSE-I2C dll.
You can find that information on LibStock Website:
http://www.libstock.com/projects/view/6 ... er-example

Best regards,
Marina

MaGiK
Posts: 897
Joined: 19 Apr 2013 10:00

Re: Support the Timer Calculator Project

#11 Post by MaGiK » 20 Nov 2013 15:28

I didn't know that LibStock pages have blogs. That's cool!
Thanks a lot for your reply Marina :D

Best Regards
Last edited by MaGiK on 05 Dec 2013 06:50, edited 1 time in total.
My hobby is collecting MikroElektronika products.
Gotta catch them all!

CharlieH
Posts: 1
Joined: 29 Nov 2013 13:20

Re: Support the Timer Calculator Project

#12 Post by CharlieH » 29 Nov 2013 13:24

I also made a small contribution, great idea & useful tool

marXman
Posts: 4
Joined: 18 May 2014 00:35

Re: Support the Timer Calculator Project

#13 Post by marXman » 18 May 2014 00:50

I've downloaded the app today and, as I am used to do that with every new app, first thing I did was to open help files... But this is what I saw in the right hand side window, after a click on the help title:
The address is not valid

Most likely causes:
There might be a typing error in the address.
If you clicked on a link, it may be out of date.

What you can try:
Retype the address.

Go back to the previous page.

Well, maybe it is just my comp settings, or something else, but if you need someone to retype the help files, or whatever, I'll be more than happy to do it...

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: Support the Timer Calculator Project

#14 Post by Dany » 19 May 2014 15:34

VCC wrote:For one of my projects, I wanted to set a dsPIC33EP512MU810 to its maximum frequency to get 70MIPS. Reading about the various oscillator settings from the datasheet, I ended up writing a small Delphi app to calculate the resulting CPU frequency, based on a given crystal and various register settings. You can find the application, attached to this post. Of course, I was thinking, in my previous post, about controllers with less complex oscillators, thus an application like this would become possible.
Hi VCC, would be a very handy tool. A lot of problems originate in a wrong oscillator configuration. Did mikroElektronika ever reacted on your proposal to make such tool themselves? Of course it will be a hell of a job to create it because there are a lot of different oscillator configurations.
Furthermore the oscillator diagrams do not show the difference between configuration bits and actual PIC registers that influence the oscillator behaviour.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

dan07
Posts: 33
Joined: 14 Aug 2013 06:09

Re: Support the Timer Calculator Project

#15 Post by dan07 » 23 May 2014 21:13

Hello,

Can I user Timer Calculator (http://www.mikroe.com/timer-calculator/) with PIC12 family?

Thanks.

Dan07.

Post Reply

Return to “Timer Calculator”