You can connect one side of a pot to ground, the other side to +5v and the middle pin to an ADC pin. Then, take a look in the PBP manual under ADCIN - it will tell you how to read the value. If you are unsure what values to use in the defines, use PicMultiCalc (search this forum for it, if you dont have it).
Once you have ADC working, you can use PicMultiCalc again to work out the timer values to create a 1Hz timer. A simple counter within the timer interrupt will let you flash the led every second, every 2 seconds, or every what every number of seconds you want. Set the target of the counter based on the ADC result.
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
Bookmarks