Thread: Accessory port
View Single Post
Old 07-29-2012, 03:44 PM   #8
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by mmatej View Post
I were not driving it at wrong frequency. No matter if I do
Code:
while true; do echo 0 > ${ac}; usleep 100; echo 1 > ${ac}; usleep 100; done;
or
Code:
while true; do echo 0 > ${ac}; echo 1 > ${ac}; done;
effect is the same. When I connect piezo to the oscillator, it works okay. I suspect there is some capacitor connected to the port in Kindle. If so, it would be hard to get higher frequencies out of the port.

New bad news: while writing this post I discovered I can hear ticks (about 5 per sec) on the piezo while the port is on. Also, I can hear eink updates clearly (try with while true; do eips -f ''; done) and I think wifi too! When I hold enter in the SSH, I can hear background noise.
The script probably has MUCH longer delays than those usleep calls, just in the echo commands. Proc ports often do not return from the echo until they are ready (depending on the device being "poked"). EDIT: In the new linux versions, "proc files" are now called "sysfs files", after they were moved from /proc to /sys.

You are probably driving it way below its resonant frequency. Although there may well be a filter capacitor on the output which could severely impede high frequencies. There may be an ioctl() call so a C program can go faster than writing to a proc file, but I did not find it (yet) in the gpl source code.

But the background noise you hear makes it seem like a filter capacitor is unlikely, so there is a good chance that we CAN switch it fast (even if we need to talk to it at a lower level such as direct GPIO output control using a custom device driver).

There is a HUGE difference between impossible and "almost impossible" (i.e. requiring heroic effort and/or OCD).

Last edited by geekmaster; 07-29-2012 at 04:01 PM.
geekmaster is offline   Reply With Quote