>>>>> "Robert" == Robert Schilling <Fun_Extra_300@xxxxxxx> writes:
Robert> Sorry :/ It seems GMX has changed its default mailformat to HTML
Robert> :( Here is my question in plain:
Robert> I'm using a U232HM module in bitbang mode and libftdi using the
Robert> python api.
Robert> class FtdiSwitch: def __init__(self): self.__ftdic = ftdi.new()
Robert> if self.__ftdic == 0: raise Exception("Error creating USB
Robert> device", self.name()) ret = ftdi.usb_open(self.__ftdic, 0x0403,
Robert> 0x6014) if ret < 0: raise Exception("Error opening USB device",
Robert> self.name()) if ftdi.set_bitmode(self.__ftdic, 0xFF,
Robert> ftdi.BITMODE_BITBANG) < 0: raise Exception("Error switching to
Robert> bitbang mode", self.name()) def set_port(self, value):
Robert> ftdi.write_data(self.__ftdic, chr(value), 1)
Robert> This code snippet accesses the first port of the U232HM
Robert> module. Since this module has 2 ports, I also would to access
Robert> the second port.
Why do you think the module has two port? The datasheet tells:
FT232H Single Channel H
Speed USB to Multipurpos
UART/FIFO IC
--
Uwe Bonnes bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|