Flow code step by step

Forum for problems or queries regarding other Flowcode Components. Eg LEDs, Switches, LCD, Gfx LCD etc

Moderators: Benj, Mods

Post Reply
Paddy O Shea
Posts: 6
Joined: Thu Oct 02, 2008 2:31 pm
Contact:

Flow code step by step

Post by Paddy O Shea »

PIC = 16f877a
Lesson = Digital Inputs / Adding Switches
When I click on the Run icon the message "Simulation complete" pops up. However there is no reaction from the LEDs.When I click on the switches they close but there is no response from the LEDS.

The lesson indicates that a warning message, Variable unavailable message and Call Stack unavailable message should appear. This does not happen Any ideas on what I am doing wrong.

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: Flow code step by step

Post by Benj »

Hello

You may have to change the switch type to toggle instead of push to make. You can do this by going into the switch properties. The LEDs will only be updated when the simulation is running so therefore if the simulation is immediatly saying completed then you will not have time to press the switches and see the result on the LEDs. Therefore I would change the switch type to toggle, set the value on the switches and then run your simulation. Alternativly you could place your code into a while 1 loop to allow it to run forever therefore giving you plenty of time to modify the values on the switch component.

Paddy O Shea
Posts: 6
Joined: Thu Oct 02, 2008 2:31 pm
Contact:

Re: Flow code step by step

Post by Paddy O Shea »

Many thanks, the toggle option worked

Post Reply