How to produce a fast clock output?

Ask a Question related to UNIX Programming, Design and Development.

  1. #1

    Default How to produce a fast clock output?

    I want to produce a clock output on the pin of parallel port. I used
    SIGALRM to implement it, and I only got a clock output with
    20ms-cycle.

    How could I produce a clock output that's cycle is 20us?
    Amundsen Zhuang Guest

  2. Similar Questions and Discussions

    1. clock extension
      Hey folks I'm looking for a reliable extension that allows me to have a customizable live clock. Any help?
    2. Pug Clock
      http://pugpro.com/Files/PPClock.zip
    3. Need help with clock...
      I am currently in the process of developing a Flash application that counts down an hour. I have also created code to load in an MP3 playlist file...
    4. #20382 [Com]: strtotime ("Monday", $date) can produce incorrect output
      ID: 20382 Comment by: pierre dot baudracco at aliacom dot fr Reported By: nickj-phpbugs at nickj dot org Status: ...
    5. taskbar clock
      "Tom S" <big_tom@earthlink.net> wrote in message news:029a01c340dc$ce250020$a501280a@phx.gbl... Move your cursor just over the top of the taskbar,...
  3. #2

    Default Re: How to produce a fast clock output?

    On 5 Aug 2003 01:22:48 -0700 Amundsen Zhuang <a_roald@hotmail.com> wrote:
    | I want to produce a clock output on the pin of parallel port. I used
    | SIGALRM to implement it, and I only got a clock output with
    | 20ms-cycle.
    |
    | How could I produce a clock output that's cycle is 20us?

    I presume you want 10us on, 10us off. How accurate does it need to be?

    1. Hack the parallel port driver to spin in a loop toggling the port at the
    right time. Good luck.

    2. Use the sound card instead of the parallel port, and output a wave file
    consisting of on and off. Be sure it can do 100 K samples / second.

    --
    -----------------------------------------------------------------------------
    | Phil Howard KA9WGN | [url]http://linuxhomepage.com/[/url] [url]http://ham.org/[/url] |
    | (first name) at ipal.net | [url]http://phil.ipal.org/[/url] [url]http://ka9wgn.ham.org/[/url] |
    -----------------------------------------------------------------------------
    phil-news-nospam@ipal.net Guest

  4. #3

    Default Re: How to produce a fast clock output?

    Amundsen Zhuang wrote:
    >
    > I want to produce a clock output on the pin of parallel port. I used
    > SIGALRM to implement it, and I only got a clock output with
    > 20ms-cycle.
    >
    > How could I produce a clock output that's cycle is 20us?
    You can't, unless you can gain exclusive use of the CPU. If you
    did this, the system would no longer work. All UNIX tasks are
    subject to time-slicing, meaning that you can only use so much
    time before the system cuts over to another task. During the time
    that the system is processing these other tasks, your task is
    suspended.

    --
    Fletcher Glenn
    email [email]f-g-l-e-n-n@quest.com[/email] (remove the dashes)
    Fletcher Glenn Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139