PCAL9714HN hardware debouncing

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PCAL9714HN hardware debouncing

1,136 Views
Thai
Contributor I

Hello,

I am trying to use this PCAL9714HN to sense some limit switches.

I want to implement hardware debouncing according to section 6.9; however, I don't know which oscillator I should use.

Can I just use a 16Mhz crystal oscillator like this ABM8-16.000MHZ-10-1-U-T

Thank you very much in advance.

0 Kudos
Reply
2 Replies

1,123 Views
ErikaC
NXP TechSupport
NXP TechSupport

Hello,

You can use 16Mhz crystal oscillator, but you should consider the Debounce counter to determinate the qualification period.

For example:

tDP = [PERIOD of EXT CLOCK] * [Debounce counter(5C)] = 62.5 ns * 10 = 625 ns (if external clock = 16 MHz, debounce count
register (5Ch) = 0Ah) 

tDP = [PERIOD of EXT CLOCK] * [Debounce counter(5C)] = 62.5 ns * 255 = 15.94 μs (if external clock = 16 MHz, debounce count
register (5Ch) = FFh)

Hope this helps.

0 Kudos
Reply

1,113 Views
Thai
Contributor I

Hello,

Thank you for your response.

I have two more questions:

1. I want to sense a limit switch for a hard stop for my motor. Which oscillator frequency would you recommend?

2. I plan to use the internal pull-up for the pin, can I just connect the switch (SW1) directly to GND like this to sense when it's being pressed?

Thai_0-1710843305484.png

Thank you for your help.

Best,

 

 

 

0 Kudos
Reply