Quote Originally Posted by texas5 View Post
wow.simple solution.haha.thanx a lot bruce.but are your coding mean i need to hold the push button to PWM on & release the button to PWM off...or push the button once to PWM on & push once again to PWM off????
Read the code! Do you see anything in that code saving the state of the button to remember for the next time the loop checks the buttons state?
The bit in the TRIS register follows the state of the push button...simple as that...just like it's written...