Steve,
There are many possible ways.
Before I post a ready to run solution, I'll give you a hint that should help you to get started and let you do some homework.
You could assign an extra variable (Flag VAR BIT) to memorize what the last action performed was: "increase" or "desrease" brightness.
Dependend on FLAG you enter the decrease or increase loop when the button is pressed.
Have you checked Presetting Configuration Fuses
Let us know how you are getting on.
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Bookmarks