Vitaliy ha scritto: > Dario, just an OT observation: you can improve readability (now and > especially in the future) if you use more meaningful function and variable > names and replace magic numbers with variables or #defines. Also, proper use > of whitespace can make a huge difference. Yeah, thank you Vitaliy :) I often, usually, do. In this case, 50Hz is almost fixed "forever" so I was not needing it. As for variable names, I considered that the names above were good enough :) -- Ciao, Dario -- Cyberdyne -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist