vb.net Timer resolution - what is it ?

  • Thread starter Thread starter anbeyon
  • Start date Start date
A

anbeyon

Hi All,

Does any one know what the resolution of the standard VB.Net timer
control is ?

I have to implement some Pulse Width modulation to drive 4 different
colour LEDS (Red, Green, Blue and White) and vary the on / off times in
order to generate different colours.

Does any one have any hints/tips thoughts as to the best way to do this
?

I'm coding in VB.NET with Compact Framework. (I have the code written
to drive the LEDS)

Thanks

Anbeyon
 
Resolution is no faster than 1ms, but the nature of the likelyunderlying
timer is such that it's not very deterministic. You might want to P/Invoke
the multimedia timer for better accuracy.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate
 
What sort of pulse-widths do you need to generate? The best way will depend
on this... And what hardware are you using to work with the LEDs ? This
also will influence the answer. The limiting factor may not be timing, but
the hardware interface.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.
 
Back
Top