Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Resource icon

Debounce both states / asm / freescale 908 2011-06-13

Status
Not open for further replies.

OlPhart

Member
OlPhart submitted a new article:

Debounce Both States / Asm / Freescale 908 - I wrote this for toggle switches. It first looks for a change of state. If seen, it counts loops to

I wrote this for toggle switches. It first looks for a change of state. If seen, it counts loops to be constantly in that state, any reversal reloads counter. Exit is by loop countout: consistent state change OR too many reloads. In effect, it soft delays out the bounce. The loop counts set debounce delay and excessive reload countout. My std rules: free to use, But put "uMax/Sarge" associated with it somewhere. TNX <<<)))

Code:
dbict   equ     $10             ;debounce Inactive count...

Read more about this article...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top