Hello dear people,
I made a program in Flowcode with PWM and a timer to turn it on and off, this did not quite work in the simulation so i made a different program with just the timer because i know PWM also uses a timer so it might have caused problems, but even without the PWM it still acts strange, it does work in the simulation now but not on my MIAC.
Also looked at some examples but those didnt really make any sense for me when simulating them
Could anybody take a look at this and shed some light on my problem and/or give advice how to make it work?
thanks in advance
Timer not working
-
- Posts: 28
- Joined: Tue Sep 28, 2010 12:36 pm
- Has thanked: 5 times
- Been thanked: 1 time
- Contact:
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Timer not working
Hello D.Bouchier.
The main issue is having a delay within your interrupt. This delay is occurs for a longer duration than the interrupt takes to fire which is a big no no.
Any delays or component macros which also have delays should not be used within timer interrupts. Also you have got your timer interrupt to trigger on external pin, and not via oscillator.
Try this.
The main issue is having a delay within your interrupt. This delay is occurs for a longer duration than the interrupt takes to fire which is a big no no.
Any delays or component macros which also have delays should not be used within timer interrupts. Also you have got your timer interrupt to trigger on external pin, and not via oscillator.
Try this.
- Attachments
-
- test modified.fcf
- (13 KiB) Downloaded 409 times
Martin
-
- Posts: 28
- Joined: Tue Sep 28, 2010 12:36 pm
- Has thanked: 5 times
- Been thanked: 1 time
- Contact: