Quote Originally Posted by pescador View Post
Jerson - I notice you have code on top of main: - the read and if - is that meant to be in the main? It actually compiled - and I have no endif for the if Duty > 128 statement... I dont understand this...

plus I created a word var - EE_DUTY...

update - works great - its what I needed.. I reduced the hertz to make it less choppy.

What I dont understand is the if without the endif above the main. Hope someone can clarify..

can I quick pay you?
I did not notice that. I meant to give you a quick hand up from where you were.

And the code

Code:
 if duty > 128 then duty = 128
is supposed to lock down the duty value to max 128. This comes in handy when the chip is newly programmed and the eeprom will read the value of duty as $FF.

Can you quick pay me - of course not - thank you. That's what we are here for. Lend a helping hand. It's you who learnt something out of it and I was once in your shoes.