official libftdi repo, /python/examples/ simple.py and complete.py files
2013/8/22 Ottavio Campana <[email protected]> > Dear Anton, > > can you tell me where the python examples are? I see only C examples... > > Ottavio > > ------------------------------ > *Inizio:* Anton Smirnov [[email protected]] > *Inviato:* giovedì 22 agosto 2013 13.55 > *Fine:* [email protected] > *Oggetto:* Re: problem with python and FT4232H > > Probably the best solution for you is to open any python bindings > examples and try them. > > > 2013/8/22 Anton Smirnov <[email protected]> > >> Sorry, but i don't understand python and i have experience with ftdi >> chips via libftdi only. >> >> Anton >> >> >> 2013/8/22 Ottavio Campana <[email protected]> >> >>> Hello, I want to command the pins of the fourth serial port used in >>> bitbang mode in python, but I am having some problems. >>> >>> Here's my code: >>> >>> #!/usr/bin/env python >>> import ftdi >>> >>> ftdic = ftdi.ftdi_context () >>> ftdi.ftdi_init (ftdic) >>> ftdi.ftdi_usb_open (ftdic, 0x0403, 0x6011) >>> chipid = ftdi.new_uintp() >>> ftdi.ftdi_read_chipid(ftdic, chipid) >>> >>> ftdi.ftdi_set_interface (ftdic, ftdi.INTERFACE_D) >>> ftdi.ftdi_set_bitmode (ftdic, 0xFF, ftdi.BITMODE_BITBANG) >>> >>> ftdi.ftdi_write_data (ftdic, '\xFF', 1) >>> >>> I have two leds attached to DD0 and DD1. When I send the command, I >>> expect the leds to have a fixed state, but they turn and off for a while >>> and then there's no way to change their state any more, unless I unplug and >>> replug the usb cable. >>> >>> So my question is: is my code correct? It's so hard to find a good >>> python example. >>> >>> Thank you for your help >>> >>> Ottavio >>> >>> ------------------------------ >>> >>> *libftdi* - see http://www.intra2net.com/en/developer/libftdi for >>> details. >>> To unsubscribe send a mail to >>> [email protected] >>> >>> >> > > ------------------------------ > > *libftdi* - see http://www.intra2net.com/en/developer/libftdi for details. > To unsubscribe send a mail to [email protected] > > > ------------------------------ > > *libftdi* - see http://www.intra2net.com/en/developer/libftdi for details. > To unsubscribe send a mail to [email protected] > > -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to [email protected]
