David BALDWIN wrote: > > Hi, > > As usual, I have some questions today... I am using the check_keys > routine from Bob Blick. In fact, it only detects falling edges on portA. > I am searching for a routine that could decide between a single press on > a switch and a long press on a switch (more than 500ms or 1s). The > reason is that I don't have so much I/O on my 16C84 and had like one > switch to have more than one function. Can anybody help? > > -david not a nice way but it worx in my app button : jnb button,xxx call waitasecond xxx jnb button,yyy first funtion starts goto button yyy second function starts goto button as for debounce and such things I use pullup resistor in paralell with a small cap it worx perfectly for me bye charley