Hi all,
I'm doing a school assignment, here we must write a program for controlling a traffic light.
Now if a want to test (simulate) my program in flowcode it doesn't work as aspected. I have setup a interupt routine that keep track of the time, how long each action should take.
But the problem is, the interupt macro never gets called. I dont know what the problem is. Is it me or is it a bug I dont know.
Maybe you can help me out.
Regards Jordy
PS. program is attached.
school project "Traffic Light"
Moderator: Benj
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
school project "Traffic Light"
- Attachments
-
- Opdracht 9 Stop Licht.fcf
- (82.82 KiB) Downloaded 264 times
the will to learn, should not be stopped by any price
-
- 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: school project "Traffic Light"
Hi Jordy
To get Timer0 to work you, will need to change the properties of Timer0 interrupt from 'Transition on T0CKI pin'
To 'Internal clock (CLKO)'
When T0CKI is selected then interrupt will only start counting when external logic level on pin RA4 changes.
Unfortunately TOCKI default is set for external clock, so there will be a few people caught out this way.
Martin
To get Timer0 to work you, will need to change the properties of Timer0 interrupt from 'Transition on T0CKI pin'
To 'Internal clock (CLKO)'
When T0CKI is selected then interrupt will only start counting when external logic level on pin RA4 changes.
Unfortunately TOCKI default is set for external clock, so there will be a few people caught out this way.
Martin
Martin
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
Re: school project "Traffic Light"
Thanks Martin
I Will have look at it tomorrow.
I Will let you knie something.
Regards jordy
I Will have look at it tomorrow.
I Will let you knie something.
Regards jordy
the will to learn, should not be stopped by any price
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: school project "Traffic Light"
jordy, i got kinda bored here so i made a new panel for your code , makes the panel easier to understand (i think you drive on the wrong side of thre road ) had to zip the file as the forum doesnt allow panel uploads
- Attachments
-
- trafic lights.rar
- (5.57 KiB) Downloaded 280 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- 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: school project "Traffic Light"
Hi Zaz, Not sure if you are aware that you can change the look of components on the control panel with custom images.
Yuo can ether get some images from here:
http://www.matrixmultimedia.com/article.php?a=418
Or create your own.
Very nice look what you have done with the panel.
Martin
Yuo can ether get some images from here:
http://www.matrixmultimedia.com/article.php?a=418
Or create your own.
Very nice look what you have done with the panel.
Martin
Martin