also cant see what the code is meant to achieve because irrespective of whatever value you have for pausetime the led will alsways be at 50% brightness as the on and off times are the same.
If you are trying to get a variable brightness then with pausetime being 0-255 you should have something like
Code:
main:
adcin 0, timeVar
pauseTime = timeVar / 12
high portb.7
pause pauseTime
low portb.7
pause (255-pauseTime)
goto main
which will give a total time of 255 but the on will vary from 0-255 whilst off will also change from 255-0
Keith
www.diyha.co.uk
www.kat5.tv
Bookmarks