On Mon, 31 Oct 2011, thoff88 wrote:
> Please keep in mind that I am fairly new to using the ts7800, but I am
> trying to drive a speaker with a square wave outputted from one of the
> pins on the DIO header. The problem is that the board seems to only
> toggle pin values at a maximum frequency of 50 Hz. Is there a way to
> output at a higher rate?
It depends on how you are trying to do it.
Caveat - I've not got experience with the ts7800.
But 50Hz is very a very special figure, that leads me to believe you are in
aloop using, probably, usleep to wait a period before toggle the output.
The problem is generic for linux, unless high resolution timers have been
implemented.
The basic interval timing provided by linux has traditionally been based on
the timing interval used to count jiffies, typically 100Hz. This clock
tick is used for scheduling etc, and effectively restricting the minimum
usleep etc wait to 10millisec. In a loop using 2 such waits one to send the
signal low and one to send it high, then you generate a 50Hz signal.
To get round this problem, you usually need to resort to using any spare
timer that may be available in the processor core, and writing some sort of
interrupt driven kernel driver.
Try googling for more information on linux timers etc.
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|