![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#21 | ||
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,223
Rep Power: 5
![]() |
Quote:
The inherent accuracy in timers under windows is +/- 15 msec. The accuracy you get under linux isn't typically much better (unless you're using a version of linux that supports real time extensions). If you have a lot of applications running (either foreground or background), the accuracy of timers will tend to reduce --- for both windows and linux. One consequence of this uncertainty, with your strategy of "poll then don't poll", is that if two or more pulses come in rapid succession, you have a good chance of ignoring at least one of them. I suggest a strategy of scanning continually (at a small interval, say 10msec), but (when a pulse is received) ignore the data received until your 50ms interval is up. Depending on how you do it (and how long the gaps are between pulses) you can probably also refine the approach to recognise the inter-pulse gap and/or identify leading/trailing edges. Quote:
Making hardware cheap will come with the cost of making the software more expensive. A few ICs, resistors, diodes, etc is almost certainly cheaper than a few hours of programmer time, unless you are making several thousand or several million copies of the hardware. And if you're making a lot of copies of the hardware, you will have to guarantee the software works on a wide range of systems (eg different types of PCs, different applications running on them, etc etc) --- which implies a software maintenance issue. Trying to fix bugs on software running on systems you can't control is not fun --- and requires considerable programmer effort. |
||
|
|
|
|
|
#22 |
|
Programmer
Join Date: Sep 2005
Posts: 50
Rep Power: 0
![]() |
true
but electronics has ckts dedicated for this only like RS232 driver and may more i wanna bypass them. basically i am doing Electronics and communication engg. thanks for good works. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|