I have got a blinking LED program for beableboard in the folowing
website:
http://blog.makezine.com/archive/2009/02/blinking_leds_with_the_beagle_board.html
I have done small changes. I remove, for example, the "sleep 1"
between echo "high" and echo "low". That way, I thought the frequency
would increase. It does increase but it still too low. It is only a
125Hz pulse clock in the expansion pin 168.
Is there anyway to increase this speed?
The program used is:
#!/bin/sch
#
# Blink the onboard LED
# GPIO=$1
cleanup() { #Release the GPIO port
echo 168 > /sys/class/gpio/unexport
exit
}
# Open the GPIO port
#
echo 168 > /sys/class/gpio/export
#trap cleanup SIGINT # call cleanup on Crtl-C
# Blink forever
while [ "1" = "1" ]; do
echo "high" > /sys/class/gpio/gpio168/direction
echo "low" > /sys/class/gpio/gpio168/direction
done
cleanup # call the cleanup routine
Thanks!
> Is there anyway to increase this speed?
> #!/bin/sch
Err, don't use a shell script and file i/o to talk to the hardware?
You've probably chosen the slowest and least appropriate language
imaginable to try to do anything fast.
I'm not sure if you have to go to the kernel or can just mmap the i/o
space and write to it directly, but you should be able to get mhz out
of it using C. Even python or just about anything else would probably
be faster than what you have.
What for anyway? Just to see if it can be done, or to do real stuff with it?
!Z
--
You received this message because you are subscribed to the Google Groups "Beagle Board" group.
To post to this group, send email to beagl...@googlegroups.com.
To unsubscribe from this group, send email to beagleboard...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/beagleboard?hl=en.