libftdi Archives

Subject: FT232R DMX512

From: Rui Barreiros <rui.barreiros@xxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 26 Oct 2010 18:51:56 +0100
Hello,

Sorry if I shouldn't be using this list for this issue but I'm tired of searching for help without any success.

I'm using an FT232R chipset, trying to read DMX512 signal without much success.

The basic method i'm using is this:

 - Open the device
 - ftdi_usb_reset
 - ftdi_set_line_property 8Bit, 2 stop bit, no parity
 - ftdi_set_baudrate 250000
 - ftdi_setrts 0
 - ftdi_usb_purge_buffers

 * Loop start
 - ftdi_poll_modem_status
 - if we got a break
     - read startbyte (1 byte)
     - read dmxvalues (512 bytes)
 - ftdi_usb_purge_buffers
 * Loop end

Now, the dmx values are read, but, in the wrong place and sometimes change places. The break detection is not working well, sometimes it's detected other times it isn't, so the update is slow as hell for a 250k baud and I'm almost sure that due to the break issue the values come in a wrong order.

I could use FTDI own driver, I have an example using Win32 API that works (all those FT_W320_* functions) but I can't make this work with libftdi, and I'd rather use libftdi instead of FTDI own lib.

Anyone has any idea or pointer to enlighten me over what I might be doing wrong ?

I'm using libftdi-0.18-1 on Ubuntu 10.10

Best regards,
Rui Barreiros

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
Current Thread