Running TRM1 and TMR2 ??
Moderator: Benj
Running TRM1 and TMR2 ??
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 ?
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, Denmark
Re: Running TRM1 and TMR2 ??
Oh, my God ... these calculations eats up all memory !
I'll have to find some other figures, so I can do integers all over !
I'll have to find some other figures, so I can do integers all over !
Best regards
KSor, Denmark
KSor, Denmark
- 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 ??
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Running TRM1 and TMR2 ??
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 ?
When I use TMR1 and TMR2 I NEVER comes to that break point - only if I use TMR0
Why ?
Best regards
KSor, Denmark
KSor, Denmark
- 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 ??
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Running TRM1 and TMR2 ??
Woops - one more error or ... ?
Will that be solved in the 4.3 version ?
Will that be solved in the 4.3 version ?
Best regards
KSor, Denmark
KSor, Denmark
- 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 ??
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!
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 ??
Yes, and ... ?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!
- 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
KSor, Denmark