Everything is as expected while debugging except that there is a weird behavior at one step. I believe this is a lower level issue, because same thing happens when I use the built-in functions of button library. I use MikroC Pro 2010. On Mon, Oct 24, 2011 at 11:58 PM, Electron wrote: > At 22.35 2011.10.24, you wrote: >>Yes I checked all the paths lots of times. Funny thing is simulation >>yields to same result as well... Very annoying... > > Have you checked the disassembly? Maybe a compiler bug? > > >> >>On Mon, Oct 24, 2011 at 11:00 PM, Vicent Colomar Prats >> wrote: >>> Have you checked your PCB connections? Do you use a pull-up or direct >>> connect to Vcc? Good solder joints? When you left an open unconnected p= in to >>> float, it can activate and deactivate randomly. Also, sometimes is good >>> practice to have a kind of debounce system( can be done with a simple d= elay >>> after output change) >>> -- >>> http://www.piclist.com PIC/SX FAQ & list archive >>> View/change your membership options at >>> http://mailman.mit.edu/mailman/listinfo/piclist >>> >>-- >>http://www.piclist.com PIC/SX FAQ & list archive >>View/change your membership options at >>http://mailman.mit.edu/mailman/listinfo/piclist > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .