libftdi Archives

Subject: Re: Can someone give me a good explanation of ftdi_set_bitmode()?

From: John Oyler <john.oyler@xxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Sat, 28 Aug 2010 19:08:32 -0500
On Aug 28, 2010, at 6:02 PM, Michael Plante wrote:

> John Oyler wrote:
>>> The example code I've been using merely sets this to 0x00.
> Setting it to 0 works fine for me.  I run SPI (with no chip-select), along
> with ADBUS6-7, on port A.

What are you using ADBUS6 and 7 for, if I might ask? And are you willing to 
show the code for it? I'm still having a hell of a time with ADBUS4. I don't 
have the scope at my disposal here on the weekend, but it's still giving me the 
behavior that makes me think CS and ADBUS4 are either both high or both low, 
but one or the other isn't happening.

>>> The first is the ftdi context object (I can't tell you what
>>> this is, it's voodoo, but I doubt I need to know specifics of this).
> Someone can correct me if I'm wrong, but I suspect that you probably need
> two of these to control both A and B simultaneously.  I'm not sure if that's
> what you're getting at here.

That's what I was thinking myself, rather than try to keep switching the same 
object back and forth between the two interfaces. Still having no luck with 
bitbang though. 

I was more concerned with the bitmask in ftdi_set_bitmode() maybe making it 
impossible to set certain bits as outputs later, something like that. Not that 
this seems likely either, since if I was setting it to 0x00 as I had, it would 
mean that I had no outputs at all. Besides, I've tested it with 0xff and even 
several random values, and I still get the same behavior, so it's almost as if 
it were ignored... which prompted my question in the first place.

John O.
libftdi - see for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx

Current Thread