libftdi Archives

Subject: Re: libftdi@xxxxxxxxxxxxxxxxxxxxxxx is a subscribers only list

From: Petr Jakeš <petr.jakes@xxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Cc: Vladimir Yakovlev <nagos@xxxxxxxx>
Date: Wed, 16 Mar 2011 16:24:41 +0100

SPI (MOSI, MISO, CLK)

1x PWM (5kHz to 10 kHz)

1x Output pin (output signal frequency max. 50 Hz)

Do you think this is doable using the FTDI chip? If yes, any hints and/or examples are highly appreciated.


SPI - easy, look at code of flashrom project http://flashrom.org/trac/flashrom/browser/trunk/ft2232_spi.c
PWM - i doubt you can do it. When using bitbang mode, data rate is unstable,  CPU need constantly send data (every pwm clock). It is bad idea. If you drive LED brightness from this PWM, it will blink unstable (sometimes with big pause).

I recommend use something like this http://focus.ti.com/docs/prod/folders/print/tlc5941.html
It has SPI controlled PWM dimmer (4096-step), no need to do it by software.



Thank for the tip about TLC5941. We know it. The ONLY problem is the price :D (nearly 10x more expensive)
We have found the way to generate PWM directly from the GPIO on the motherboard (Alix1 from PC-Engines)

What about an 50Hz output pin? Is it doable to have FT2232D for booth, SPI and output pin?

Petr


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


Current Thread