Hello,

Thank you very much for your answers guys ! For you that code is nothing but for me it is what I wrote after spending hours on the forum and on the datasheet... trying to understand what i'm writing. So I am sorry if you feel that way..
Bruce, thank you for putting in the right order my code, it is working now but somehow when my potentiometer is at its maximum i'm only able to have 50% duty cycle ? Where does this come from ?