libftdi Archives

Subject: Re: Reading DMX

From: Rui Barreiros <rui.barreiros@xxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 09 May 2014 10:25:33 +0100
Hi,

I was never able to solve that issue, I just gave up on reading DMX with any FTDI device using software and went the MCU path by using AVR (that particular project was an ATMega8).

The problem was not chip specific in my case, because in windows using FTDI  D2XX direct driver implementation over windows I managed to properly parse the DMX signal and read it without any complication, but since I needed it to work under linux I had to abandon it and go the MCU route.

I didn't research enough to figure out where the problem lies (libusb, libftdi, etc) due to time constraints.

Good luck.

On 05/08/2014 11:29 PM, E.S. Rosenberg wrote:

2014-05-09 1:27 GMT+03:00 E.S. Rosenberg <es.rosenberg+libftdi.i2net@xxxxxxxxx>:
Hi all,

Several years ago Rui Barreiros already posted a question on the subject which at the time doesn't seem to have been resolved and I am running into the same problem more or less:

The DMX packet is read but ends up shifted over different amounts of bit every read.

I currently suspect that this is all dependent on when the OS issues the ftdi_read_data() call, I suspect this because when I ran my test program using gdb the shifts were a lot more extreme (almost 0.5 packet) then when it was running directly.

The packet itself is basically:
1. BREAK (>= 88us of LOW)
2. MAB (>= 8us HIGH)
3. 25-513 data slots (1b start HIGH, 8b data, 2b STOP HIGH each)

So my question is: Is there any way to 'allign' the reads to the break+mab?

attached is my modified version of the serial_test.c example.

Side questions:
- Can someone on the list explain the different flow control options?
- What is the RTS?

Thanks,
Eliyahu - אליהו

The device I am using is a USB-COM485-Plus4

Thanks,
Eli


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




--

Rui Barreiros
rui.barreiros@xxxxxxxxxxxx
Tlm: +351 962 356 020
Rua Alminhas das Cais, 950
4410-497 Serzedo VNG
Portugal
NIF: 506 107 523
Tlm: +351 968 015 215
Tlf: +351 227 625 805
Fax: +351 227 534 304
geral@xxxxxxxxxxxx




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


Current Thread