Page 1 of 1

Flow code step by step

Posted: Thu Oct 02, 2008 2:47 pm
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.

Re: Flow code step by step

Posted: Thu Oct 02, 2008 4:57 pm
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.

Re: Flow code step by step

Posted: Thu Oct 09, 2008 12:45 pm
by Paddy O Shea
Many thanks, the toggle option worked