??? 07/07/06 17:36 Read: times |
#119829 - Implimentation details Responding to: ???'s previous message |
Thanks for asking Richard.
Richard said: how the bounce times were measured My program is really simple and does not make too many assumptions. I read the parllel port 500000 times and Everytime I read, I write to the text file "Time.txt" two things: Time at which it was being read(right to the millisecond) + value at parllel port. so a sample output of Time.txt would look like ths: . . . . 23:32:45.234 255 23:32:45.234 255 23:32:45.234 255 23:32:45.234 255 32:32:45.234 254 32:32:45.234 254 32:32:45.234 254 . . . . and How do we know what the sample resolution of the parallel port is? There are no conditional satements here. So each entry takes fairly the same time. This can also be verified by looking at how many entries werte made between the first 23:32:25.234 and the last 23:32:45.234 and how many between the first 23:32:25.235 and last last 23:32:45.235 If they are very much the same (say n for both) then the sample rate has been quite uniform when the program was run. After 500000 samples the program stops reading parllel port and starts processing the data produced in Time.txt. Then by using the formula 1000/n we can get the resolution of the sampling independent of the sampling rate specification of the perticular parllel port. The next step is to look at how many consecutive same-port-Values were written. Like say there are 200 "255"s and followed by 56 "254"s then and so on. By multiplying these numbers with the resolution we just calculated, we can get the time for which each signal persisted. After that, signals lasting for shorter than 40ms is assumed to be bounce and the rest are not. This is displayed in the report. So, what do you guys think? By the way, I'll try to post a zip file as soon as I can. Because I myself dont have access to a WinRAR right now. Please be paitent. |
Topic | Author | Date |
Reading Bounce Characteristics on a PC | 01/01/70 00:00 | |
System Requirements | 01/01/70 00:00 | |
Nothing in perticular | 01/01/70 00:00 | |
OS? | 01/01/70 00:00 | |
Microsoft XP; 2000; NT; 98 ;95 | 01/01/70 00:00 | |
all? | 01/01/70 00:00 | |
I wouldn't bet on it | 01/01/70 00:00 | |
totally irrelevant | 01/01/70 00:00 | |
What loads are switched? | 01/01/70 00:00 | |
I agree | 01/01/70 00:00 | |
It would be interesting to know things | 01/01/70 00:00 | |
Implimentation details | 01/01/70 00:00 | |
Again... | 01/01/70 00:00 | |
Well the relays are ..... | 01/01/70 00:00 | |
Only to detect mains voltage? | 01/01/70 00:00 | |
Yes, I know but..... | 01/01/70 00:00 | |
no, they are not "independent of the supply voltag | 01/01/70 00:00 | |
Comparable to relays | 01/01/70 00:00 | |
Optos | 01/01/70 00:00 | |
Exiting stuff! | 01/01/70 00:00 | |
Not necessarily! | 01/01/70 00:00 | |
It would be interesting to know things | 01/01/70 00:00 | |
Could somebody verifiy the result | 01/01/70 00:00 |