Hi
I am trying to get lirc working with my Adafruit FT232H device and
having some problems with getting the clock speed (baud) correct.
I'm trying to transmit a carrier frequency of 38KHz which is turned on
and off based on the IR pattern to transmit.
I've created a separate program from LIRC to investigate this which
simply opens the device, sets bit bang mode, sets the baud rate, and
writes a block of 4k alternating 0xff / 0x00.
I'm driving an IR LED and I have a receiver which will print out the
duration it detects the 38KHz carrier for if the frequency is close.
I'm using libftdi-HEAD-c4c9f0a from a few days ago.
If I provide a baud rate of 3800 to ftdi_set_baudrate then that for some
reason gives me the required 72K bits / second transmission rate. This
is completely at odds with any docs I can find or the LIRC code.
As an experiment I tried building the same program against the FTDI D2XX
libraries which the docs say multiplies the rate up by 16. But to get
that to give me the correct baud rate, I have to pass 15200 as the
argument to FT_SetBaudRate.
USB sniffing shows that ultimately both of these calls result in the
same value being passed down to the chip.
Can anyone help me understand why I have such a seemingly bizarre bit
rate being used by this device?
I had some eeprom issues initially with the device; is it possible that
the eeprom contents can affect the baud rate like this?
Or have I bought a fake FTDI device which doesn't operate as the genuine
ones do?
TIA for any ideas!
Andy
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|