I am not sure why you have these two lines – they will always be false since they follow your HIGH and LOW statements ... delete them (in my opinion)
To get you going, try this for your Loop – Goto Loop section (written close to your style).Code:if outputline0=0 then outputline1=1 (these are the two lines i am having) if outputline0=1 then ouputline1=0 ( problems with )
After this works, you can work on saving the state of the toggle in EEPROM. What PIC are you using?Code:Loop: ' ' 'Test for Trigger '---------------- If InputTrigger=0 then pause 30 ' Debounce time If InputTrigger = 1 then Loop ' Debounce check – exit out of loop if not low after 30 mS While InputTrigger=0 ' Wait for button release before updating Wend ' so you do not race through your Loop routine a zillion times before you release the button GPIO = GPIO ^ 3 ' Toggle bits 0 and 1 - See PBP manual section 4.17.14 Endif Goto Loop




Bookmarks