Page 1 of 1

Running TRM1 and TMR2 ??

Posted: Thu Mar 18, 2010 9:47 am
by ksor
What shall I do to make TMR1 and TMR2 run in this simple test program.

I can make TMR0 run - by simply referencing it in the dialog and set the prescalers.

In the same way I can't get TMR1 and TMR2 to run.

What do I need to do more ?

Re: Running TRM1 and TMR2 ??

Posted: Thu Mar 18, 2010 1:21 pm
by ksor
Oh, my God ... these calculations eats up all memory !

I'll have to find some other figures, so I can do integers all over !

Re: Running TRM1 and TMR2 ??

Posted: Thu Mar 18, 2010 1:55 pm
by Benj
Hello Ksor

Timer 1 and Timer 2 can simply be included into the program and should run as expected. The program you posted up simply changed the value of a variable which wasn't actually used anywhere in your program.

Floating point calculations do consume a large amount of memory and also require a fair amount of processing time. That is unfortunatley one of the major downsides to using 8-bit microcontrollers.

Re: Running TRM1 and TMR2 ??

Posted: Thu Mar 18, 2010 2:10 pm
by ksor
Oh, but the program was just a very simple test - I just toggles a break in the ISR.

When I use TMR1 and TMR2 I NEVER comes to that break point - only if I use TMR0

Why ?

Re: Running TRM1 and TMR2 ??

Posted: Thu Mar 18, 2010 2:25 pm
by Benj
The simulation of some specific interrupts is not great im afraid.

To test the timer1 and timer2 interrupts you are better off testing using the hardware.

If you have ICD functionality either via the EB006 v7 or the FlowKIT then you can use the ICD to see set breakpoints and these should work correctly.

Re: Running TRM1 and TMR2 ??

Posted: Thu Mar 18, 2010 3:05 pm
by ksor
Woops - one more error or ... ?

Will that be solved in the 4.3 version ?

Re: Running TRM1 and TMR2 ??

Posted: Thu Mar 18, 2010 4:55 pm
by Steve
Ksor,

I personally would not call this an error because we do not say that the simulation of the code is perfect. But it is sufficient in the majority of instances.

To make the simulation perfect would take far too much effort. This is why we have created the ICD functionality - this is a far better tool for debugging programs because your program is actually running on the device. But even then, I would not claim that it is perfect - especially where multiple interrupts are being executed and the difference in timing between different threads could produce differing results in the "debug" and "release" builds of the code.

Flowcode has been designed to allow those with little or no programming experience to create programs. It does not claim to be a totaly replacement for traditional languages like C or Assembly. In fact, many of its features are designed to help people learn C - and it is used in this way in many universities around the world.

From your previous posts, I know you are an Assembly programmer and have been programming PICmicros for the past 4 years. Perhaps you should consider using Assembler for your current project(s)?

I've also done a quick count of your posts over the years and you've made 108 to date. Of these, 92 have been made within the last month. This is an incredible statistic!

Re: Running TRM1 and TMR2 ??

Posted: Fri Mar 19, 2010 7:53 am
by ksor
steve wrote:I've also done a quick count of your posts over the years and you've made 108 to date. Of these, 92 have been made within the last month. This is an incredible statistic!
Yes, and ... ?

- maybe you don't like users to use your forum or ... I don't get your point here.

Is ICD designed to be used with stand alone PICs directly or is it designed for use with your own HW products ?
Can you give me a link to a true description of the product - not just some glorious markering material.

Re: Running TRM1 and TMR2 ??

Posted: Fri Mar 19, 2010 9:23 am
by Steve
I make no point in particular.

Re: Running TRM1 and TMR2 ??

Posted: Fri Mar 19, 2010 9:34 am
by ksor
No info link to ICD ?

Re: Running TRM1 and TMR2 ??

Posted: Fri Mar 19, 2010 9:37 am
by Steve
What information do you want to see that is not in our marketing literature? If you have some specific questions, I'd be happy to help.