Running TRM1 and TMR2 ??

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
ksor
Posts: 126
Joined: Mon Oct 23, 2006 3:50 pm

Running TRM1 and TMR2 ??

Post 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 ?
Attachments
Test INTR.fcf
(4.5 KiB) Downloaded 375 times
Best regards
KSor, Denmark

ksor
Posts: 126
Joined: Mon Oct 23, 2006 3:50 pm

Re: Running TRM1 and TMR2 ??

Post 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 !
Best regards
KSor, Denmark

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: Running TRM1 and TMR2 ??

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

ksor
Posts: 126
Joined: Mon Oct 23, 2006 3:50 pm

Re: Running TRM1 and TMR2 ??

Post 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 ?
Best regards
KSor, Denmark

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: Running TRM1 and TMR2 ??

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

ksor
Posts: 126
Joined: Mon Oct 23, 2006 3:50 pm

Re: Running TRM1 and TMR2 ??

Post by ksor »

Woops - one more error or ... ?

Will that be solved in the 4.3 version ?
Best regards
KSor, Denmark

User avatar
Steve
Matrix Staff
Posts: 3431
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Running TRM1 and TMR2 ??

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

ksor
Posts: 126
Joined: Mon Oct 23, 2006 3:50 pm

Re: Running TRM1 and TMR2 ??

Post 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.
Best regards
KSor, Denmark

User avatar
Steve
Matrix Staff
Posts: 3431
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Running TRM1 and TMR2 ??

Post by Steve »

I make no point in particular.

ksor
Posts: 126
Joined: Mon Oct 23, 2006 3:50 pm

Re: Running TRM1 and TMR2 ??

Post by ksor »

No info link to ICD ?
Best regards
KSor, Denmark

User avatar
Steve
Matrix Staff
Posts: 3431
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Running TRM1 and TMR2 ??

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

Post Reply