matsstaff / stc1000p

Programmable thermostat firmware and arduino based uploader for the STC-1000 thermostat
GNU General Public License v3.0
267 stars 47 forks source link

Increase debounce time. #31

Closed matsstaff closed 10 years ago

matsstaff commented 10 years ago

Too short debounce time, sometimes single press registers as double press.

matsstaff commented 10 years ago

Should be an easy enough fix, though proper settings for the timer need to be set, so acceleration will still work properly.

matsstaff commented 10 years ago

// Postscaler 1:6, Enable counter, prescaler 1:64 T6CON = 0b00101111; // @4MHz, Timer 2 clock is FOSC/4 -> 1MHz prescale 1:64-> 15.625kHz, 250 and postscale 1:6 -> 10.42Hz or 96ms PR6 = 250;