From: "Dave Hylands" <dhylands@gmail.com>
To: "Remy Bohmer" <linux@bohmer.net>
Cc: "Jon Smirl" <jonsmirl@gmail.com>,
"ARM Linux Mailing List"
<linux-arm-kernel@lists.arm.linux.org.uk>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: Toggling GPIO at 38Khz
Date: Wed, 8 Oct 2008 15:24:27 -0700 [thread overview]
Message-ID: <c32efac40810081524q15b0a747oe49de0cf0a2aa2e2@mail.gmail.com> (raw)
In-Reply-To: <3efb10970810081157s5e0f8034n63856d2da42b3ad3@mail.gmail.com>
>> So how do I reliably generate 38Khz without destroying latency in the
>> system? I also don't want to measure the speed of the code I'm
>> executing - same code has to run on 90Mhz ARM and 3Ghz Core2. If a do
>> a loop with nanosleep() I need to know how fast my code is to subtract
>> it's execution time form the sleep time. The existing LIRC code works
>> this way and measures it's timing loop.
>> hrtimers look promising, but hrtimers doesn't have a periodic API. Is
The 38 kHz decoders will actually work across a range of frequencies
usually about +/- 4 kHz.
If you have a spare UART, you could configure it at 76800 baud and
just send out an appropriate bit pattern (taking into consideration
start bit, stop bit, parity, etc.
115200 baud might also work (3 bit times per 1/38400 of a second). It
won't be a perfect square wave, butI think it would still work.
You could also do something similar if you have a SPI interface. Just
set the clock to the right frequency and use the bits sent out to
generate your pulses.
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/
next prev parent reply other threads:[~2008-10-08 22:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-08 3:43 Jon Smirl
2008-10-08 6:40 ` Eric Miao
2008-10-09 8:38 ` Andy Green
2008-10-08 12:01 ` Bill Gatliff
2008-10-08 13:06 ` Jon Smirl
2008-10-08 17:00 ` Chris Friesen
2008-10-08 21:58 ` Krzysztof Halasa
2008-10-08 18:57 ` Remy Bohmer
2008-10-08 22:24 ` Dave Hylands [this message]
2008-10-09 2:26 ` Bill Gatliff
2008-10-09 17:53 ` linux-os (Dick Johnson)
[not found] <bkydL-21G-5@gated-at.bofh.it>
2008-10-08 12:15 ` Bodo Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c32efac40810081524q15b0a747oe49de0cf0a2aa2e2@mail.gmail.com \
--to=dhylands@gmail.com \
--cc=jonsmirl@gmail.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@bohmer.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®