> Disclaimer: I've never used MPSEE. This is just my understanding having read
> through the relevant section of the shared AppNote.
> Value = bit field for each pin's logic level Direction = set pin as input or
> output, you can read driven value and actual pin value separately with
> libftdi I believe.
> Are you setting direction = 0xFB and then reading 0x0B or do you use those
> values depending on the lib? I don't quite follow what you mean there.
Its set depending ont the lib I use. The libFTDISpi I referenced sets that last
byte as FB for both toggling low and high, libMPSSE sets it as 0B. it's a small
discrepancy that.. confuses me. Someone could be wrong though but I'm not sure
who it is.
> the command 0x80 0x08 0x00 should
> - configure only low byte pins (ADBUS 7-0)
> - set pin[3] high
> - set all low byte pins as input
>
> I don't know if there are any MPSEE based examples in the libFTDI tree but
> that would also be a good reference.
> Ryan
Ok maybe whats getting me confused is that we are using the dbus3 as
chipselect. I've been looking at it all wrong since 0x00 selects dbus3 in the
code.
So
0x80 0x00 0x00 sets all pins low, sets all as inputs. If what I'm thinking
makes since and I should go confirm this with my hardware team. The reason why
the CS start at dbus3 is that maybe in spi mode the ftdi chip uses adbus 0-2 as
miso/mosi/clk... 0xX8 would set dbus 3 as an output only, while the libmpsse is
using dbus 3-7 as outputs 0xF8. Hmmm seems wrong otherwise the libmpsse is
toggling all the chip select lines.
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|