>> Thank you Marechiare - we've been into this and I did not want to add >> more parts. Liked a complete-software approach.. > Let us speak about transformers, for the mentioned transformer seems > not to fit well the "complete-software approach" :-) I understand that connecting AC mains seemed to result in magic smoke being let out of the PIC, so a transformer seemed like a good idea :-). I think that we can't do too much more good until we know the final actual circuit. It is obviously simple but undertain. I think that Olin's version is probably correct (and that mine is wrong). When we all know what a partitor is (divider?) it will be clearer. Russell -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist