how to display text and light at the same time?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
Morfius
Posts: 9
Joined: Tue Feb 10, 2009 4:12 pm

how to display text and light at the same time?

Post by Morfius »

Hi,
Can someone tell me how to display text and light at the same time?

User avatar
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: how to display text and light at the same time?

Post by Benj »

Hello

How do you mean text and light?

Can you not simply write data to a LCD and then output a logic high to a LED?

Morfius
Posts: 9
Joined: Tue Feb 10, 2009 4:12 pm

Re: how to display text and light at the same time?

Post by Morfius »

on the simulation with gLCD and LED's: first gLCD text display, then the LED's.
If the hardware display booth at the 'same time' then it' s no problem.
will the display display booth at the 'same time'?

If you want, can you please explane my problem?:
after macro Naam, I must always be able to stop.
but after macro Spel I must push stop long enough to stop.
Why is that?
Attachments
project_automatisatie1.fcf
(44.29 KiB) Downloaded 308 times

User avatar
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: how to display text and light at the same time?

Post by Benj »

Hello Morphius

Please dont double post I believe I've told you about this before.

The hardware is a serial processor which deals with one command at a time however it is running at high speed eg millions of cycles per second, so if you have one command after another they will effectivly run at the same time as far as a human is concerned.

Not sure what you mean with the stop button functionality. Could you maybe explain your problem a bit better.

Morfius
Posts: 9
Joined: Tue Feb 10, 2009 4:12 pm

Re: how to display text and light at the same time?

Post by Morfius »

sorry, I won't do it again.

About the stop:
I made an interrupt in macro 'naam'.
this way, if I push stop-switch after the interrupt, the simulation will stop.
For almost every loop, I made 'sch<>128' so if I push the stop-switch, I would be able to stop the simulation.

in the macro 'spel' (after macro 'naam'), I can stop by just pushing the stop-switch (doesn't matter how long).
but in the macro 'invoer' (after macro 'spel'), I must push the stop-switch for a moment before the simulation stops.

now, if I use debug, I can push the stop-switch once when I meet the input, after that I still use the debug to go further. This way the simulation will stop and the switch will be 128 all the time. But when I push the play-button and the simulation goes normal, the switch (sch) goes from 128 to zero.

So I don't know where the switch goes zero and by that I can't see where my problem is.
will I still have this problem If I would simulate it on hardware?

User avatar
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: how to display text and light at the same time?

Post by Benj »

Hi Morfius

Thanks thats much appreciated :) Otherwise it may look to some users like we dont answer some questions. Yes I do get people ringing me up stating that they have seen an unanswered post so they are not going to bother with posting on the forum. Sometimes a post can slip through the net of unanswered posts so if you've waited a day or two for an answer then add another post to the same topic and we will pick up on it again. Normally during a working week we will answer posts within an hour or two.

You are using the port change interrupt which means that the interrupt will fire once when you push the switch and again when you release the switch. This could be why the variable is returning to 0. You could read the value into a backup variable in your interrupt routine and then if the backup variable is 128 or > 0 etc then copy the value to your sch variable.

Its normally good to test on the hardware too if you have it as Flowcode is not 100% perfect (though its getting closer :P ) and its normally easier to troubleshoot as your going along rather then right at the end.

Morfius
Posts: 9
Joined: Tue Feb 10, 2009 4:12 pm

Re: how to display text and light at the same time?

Post by Morfius »

Thanks

It works perfectly on flowcode now.
I will test it on the hardware next week.

Post Reply