Please, give a little information:
Hardware sketch
Software excerpt (or complete, if less than, say, 20 lines)
Regards