school project "Traffic Light"

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
User avatar
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"

Post by Jordy101091 »

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.
Attachments
Opdracht 9 Stop Licht.fcf
(82.82 KiB) Downloaded 264 times
the will to learn, should not be stopped by any price

medelec35
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"

Post by medelec35 »

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
Martin

User avatar
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"

Post by Jordy101091 »

Thanks Martin
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

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: school project "Traffic Light"

Post by dazz »

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

medelec35
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"

Post by medelec35 »

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
Martin

Post Reply