I agree...but that's what I'm asking!
So to trap a quick touch, you just keep checking the frequency from the output of the CPS module ...via a fixed timebase (timer interrupt) - if the frequency has deviated down by say 20% or more than a sensor has been touched (to trap the deviation I just compare the last sampled count with the present)
But the problem with holding a finger on a sensor, is that between successive interupts the frequency count will be more or less the same between successive interrupt ...so I guess I'm trying to wrap my head around the logic!
I guess if you have an average 'normal count' (where nothing is touched) stored away somewhere, then you can trap when a finger is being held on the sensor ...but the problem with 'normal count' & capacitive touch is that the frequency can drift (temperature humidity etc)...so the 'normal count' itself moves around! This isn't really a problem with a quick touch, becuase all I'm doing is comparing the present count with the last count ...these are only one short interrupt away from one another (the 'normal count isn't likely to drift that much under such circumstances)
Need to mull it over a bit longer I guess...but thought it worth asking here as chances are someone has addressed this before!




Bookmarks