M.P. Tools -> Add feature for calculating TMRs

Post your requests and ideas on the future development of mikroPascal.
Post Reply
Author
Message
ricardo.pascoal
Posts: 65
Joined: 04 Jan 2005 17:00
Location: Brazil
Contact:

M.P. Tools -> Add feature for calculating TMRs

#1 Post by ricardo.pascoal » 30 Jun 2006 20:59

A interesting feature is put in Tools menu a screen for calculating TMRs
according clock, prescaler and timing wished...something seems like it

Regards

piort
Posts: 1379
Joined: 28 Dec 2005 16:42
Location: Laval,Québec,Canada,Earth... :-)
Contact:

#2 Post by piort » 30 Jun 2006 23:24

i agree with ricardo but add appropriate concerning register value :roll:

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

#3 Post by zristic » 03 Jul 2006 08:41

Great idea. Added to WL.

ricardo.pascoal
Posts: 65
Joined: 04 Jan 2005 17:00
Location: Brazil
Contact:

#4 Post by ricardo.pascoal » 03 Jul 2006 13:42

Its really good !

anton
Posts: 807
Joined: 23 Sep 2004 09:16
Location: South-Africa
Contact:

#5 Post by anton » 18 Jul 2006 20:28

Hi,

If seen this topic in the mikroBasic forum also, so I though I would give it a shot to make a small Timer Calculator.

Here is a picture of it so far.

Image

Working of the program
1. Select the timer module you want to use
2. Select P16 or P18 and the cristal speed
3. Select desired output in ms. (eg 100ms)
4. Click "Generate Code"
5. Now you have code for mikroElektronika compilers
6. Select the compiler code you want. (Pascal, Basic or C)
7. Click "Copy code to clipboard"
8. Paste your code in compiler and compile

Bugs and todo
Only for TMR0 on P18 at the moment and only generating pascal code. I've only had a few minutes today to do this, so will add the other features soon.

Download
http://www.riecktron.za.net/other/timer ... r_v0_1.exe

Anton
Another proud user of LV 24-33A Development System and mikroPascal PRO for dsPIC :)
PortA not working? Add CMCON := 7; PortD not working? Add ADCON1 := 6;
To paste code on the forum, please use the [b] Code [/b] button !! ;)

anton
Posts: 807
Joined: 23 Sep 2004 09:16
Location: South-Africa
Contact:

#6 Post by anton » 18 Jul 2006 21:13

Hi again,

I've made a quick webpage for the Timer Calculator.
You can find it here

Anton
Another proud user of LV 24-33A Development System and mikroPascal PRO for dsPIC :)
PortA not working? Add CMCON := 7; PortD not working? Add ADCON1 := 6;
To paste code on the forum, please use the [b] Code [/b] button !! ;)

jpc
Posts: 1986
Joined: 22 Apr 2005 17:40
Location: France 87

#7 Post by jpc » 18 Jul 2006 21:21

Nice tool Anton , hope you find time to finish it's full implementation

piort
Posts: 1379
Joined: 28 Dec 2005 16:42
Location: Laval,Québec,Canada,Earth... :-)
Contact:

#8 Post by piort » 18 Jul 2006 23:28

hi Anton,

Nice work :-)

Im woorking on same kind of thing but include in another project... init tool...
I have saw few time on the forum for request about this kind of tool so im working to make one in Delphi 2K5... If i can find the time ( why day dosent have 200000000 hour .. lol) , that will be good for test in 2 or 3 week...
you can have a screenshot of the projet http://www.automatiz.com/down/idea.jpg

Since im working in pascal, the code generate will be in pascal :-)

happy coding

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

#9 Post by zristic » 19 Jul 2006 09:14

Great work Anton, just please finish it. Do not leave it undone.

anton
Posts: 807
Joined: 23 Sep 2004 09:16
Location: South-Africa
Contact:

#10 Post by anton » 19 Jul 2006 16:10

Hi,

A new version is now available that supports mikroPascal, mikroBasic and mikroC on TMR0.

You can download it from here (v0.2) [405kb]

Anton
Another proud user of LV 24-33A Development System and mikroPascal PRO for dsPIC :)
PortA not working? Add CMCON := 7; PortD not working? Add ADCON1 := 6;
To paste code on the forum, please use the [b] Code [/b] button !! ;)

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

#11 Post by zristic » 20 Jul 2006 08:05

@Anton:

My suggestion is that when generating code you put the line "if counter = xxxx" inside the interrupt procedure. There are some advantages of doing it. Moreover, it is a usual practice to decrease the load on main loop which in this case executes very fast.

Post Reply

Return to “mikroPascal Wish List”