Hello all
The TMR3 on my PIC device does not work when used as a timer. Reassigning to identical TMR1 or TMR5 does however work.
Great new year everyone.
Howard
PIC18F45K22
FC 7.3.0.5
Timer not working
Moderator: Benj
- 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: Timer not working
Hi Howard,
I've had a look through the Flowcode chip definition and so far I haven't spotted a reason for timer 3 to be different from timers 1 or 5. Can you post a demo program that exhibits the problem.
I've had a look through the Flowcode chip definition and so far I haven't spotted a reason for timer 3 to be different from timers 1 or 5. Can you post a demo program that exhibits the problem.
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
-
- Posts: 75
- Joined: Thu May 24, 2012 1:15 pm
- Location: Cape Town
- Has thanked: 30 times
- Been thanked: 28 times
- Contact:
Re: Timer not working
Hi Ben
Here is that code
thanks
Howard
Here is that code
thanks
Howard
- Attachments
-
- TMR3 test.fcfx
- (75.04 KiB) Downloaded 202 times
-
- Posts: 75
- Joined: Thu May 24, 2012 1:15 pm
- Location: Cape Town
- Has thanked: 30 times
- Been thanked: 28 times
- Contact:
Re: Timer not working
Hi Ben
It may be of use to you to know that I have duplicated this problem on a different chip type from the same family.
In this example I have enabled each timer, TMR1 TMR3 TMR5, one at a time to deliver about 30Hz. These are the results..
TMR1 correctly flashes the attached LED at 1Hz
TMR3 does not work.
TMR5 incorrectly flashes the LED at 4Hz.
Many thanks
Howard
PIC18F46K22
It may be of use to you to know that I have duplicated this problem on a different chip type from the same family.
In this example I have enabled each timer, TMR1 TMR3 TMR5, one at a time to deliver about 30Hz. These are the results..
TMR1 correctly flashes the attached LED at 1Hz
TMR3 does not work.
TMR5 incorrectly flashes the LED at 4Hz.
Many thanks
Howard
PIC18F46K22
- Attachments
-
- TMR3 test 2.fcfx
- (10.98 KiB) Downloaded 195 times
- 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: Timer not working
Hi Howard,
Thanks for that. I'm having another look for you now.
I have looked at the Microchip errata document for the device and it does mention the timers 1, 3, 5 several times so it could be it's a silicone bug. I'll have another look through the code just to be sure.
Maybe try FOSC/4 instead of FOSC as the clock source?
Thanks for that. I'm having another look for you now.
I have looked at the Microchip errata document for the device and it does mention the timers 1, 3, 5 several times so it could be it's a silicone bug. I'll have another look through the code just to be sure.
Maybe try FOSC/4 instead of FOSC as the clock source?
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