Hi Anton, I'm working on a similar project in the moment using libftdi.
My task is to create a "clk" signal as an output (asynchronous write) and sample the state of an input pin. "Asynchonous BitBang Mode" to be more precise... So far I got a continous write using a second thread (asynch write, configure libftdi with according switch). The reading creates some problems in the moment, but I'm after it... I don't exactly know how to arrange the function calls, and getting a deadlock while writing if i read in parallel after a few seconds in libusb-1.0. Writing alone works like a charm (2.35mhz clk from 10mhz basesignal, with ~10% jitter. Does someone know of a faster basesignal possible?) If you want you can have a look at my code in http://github.com/marvin2k/micBang -- maybe this could help you. I'm using the Signalyzer H2 dongle with an ft2232h. Actually, I tried fastftdi yesterday in the evening with instantly good results ;-) but no final resumee... Greetings Martin Am Dienstag, den 06.07.2010, 07:46 +0600 schrieb Anton A. Litvinov: > Hello > > I am writing a program that should > a) continuously read data from FTDI-port in the background and store > it into file. > b) receive some commands from stdin and do appropriate writes into FTDI-port > > Questions > 1. > can a) and b) run in different threads or > I should place read and write into a cycle in one thread and > read(stdin) -- in another ? > and establish link beetween one to another by means of queue (fifo) ? > > 2. > or maybe I should use some kind of non-blocking read ? > -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to [email protected]
