Just so nobody gets the wrong idea...I'm not being a royal a$$ here....
In your program...(and again, not being an a$$, just trying to get you to understand what's what here)
You have 'If Pushed = 1'...Pushed is a variable...Where is 'Pushed' being set to anything, at least anything that is going to be useful to you?Code:Button var PORTB.0 ' Push button LED1 var PORTB.1 ' Led 1 LED2 var PORB.2 ' Led 2 Pushed var byte ' Variable will contain the byte If PUSHED =1 Then ' If button is push High LED1 ' Turn on the LED IF PUSHED=0 Then High LED2 endif




Bookmarks