Subject: Re: Problems with FT232R in bitbang mode
Thomas Jarosch schrieb:
I have a USB2Serial cable with FT232RL and measured directly at the chip
(bonding wires connected to spare pins). So what does "internal
packetsize" mean? Is there a document where these internal facts are
explained? What is the maximum size of a ftdi_write_data() call?
Oh yes, of course, if you send everything in one buffer,
then it should theoretically always work. Though you have to make sure
you use only one ftdi_write_data call() for that. The internal
packet size is 64 bytes for the old chips and 512 bytes
for the new hispeed chips.
Updating to libftdi-1 was one of the first ideas I had as I read
something about async USB operations. If it helps that I investigate
this issue any further just give me a hint.
Is there something wrong with this example (except from checking return
values etc...)? What am I going to measure with my scope? I would say I
should measure a peak of 6.51 µs according to FTDI specs (baudrate * 16)
or 13.02 µs according to other specs (baudrate * 8). What I really
measure is most of the time 3.24 µs (baudrate * 32?????) and sometimes
14.7 µs and seldom 17.7 µs. Any explanation?
I then extended the testbuf to 7 bytes (0101010) and now I NEVER see
three equal pulses and space between them on my scope. Why do I have
bitbang mode if it is like this??? Ok, I increased the baudrate to 65536
(as suggested by Albert Huitsing) and now I see three equal spaced peaks
and spaces very stable. If I increase the buffer to 9 bytes (011100010)
I see most of the time a stable peak and space followed by a single peak
but sometimes only a single peak. How can this all fit together?
Sorry, I am a little bit lost here. Either I have totally misunderstood
the whole thing or the FT232RL is just not made for this mode.
IIRC there was an issue with the first ftdi_write_data() call being
lost on application startup. So you could try to run your test patterns
in a loop with f.e. 5 seconds of pause in between. Does it look stable?
Also you could try to use libftdi-1 + libusb-1.x so test
if it makes any difference.
My original idea was to generate a modulated carrier of 38kHz with the
bitbang mode. Now I will generate the carrier idependently with a timer
IC and only the modulation with the FTDI chip. Here a few microseconds
deviation should be no problem.
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx