{"action":"created","issue":{"url":"https://api.github.com/repos/eblot/pyftdi/issues/79","repository_url":"https://api.github.com/repos/eblot/pyftdi","labels_url":"https://api.github.com/repos/eblot/pyftdi/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/eblot/pyftdi/issues/79/comments","events_url":"https://api.github.com/repos/eblot/pyftdi/issues/79/events","html_url":"https://github.com/eblot/pyftdi/issues/79","id":282749237,"number":79,"title":"Access ACBUS and use it as GPIO?","user":{"login":"lifetyper","id":1171298,"avatar_url":"https://avatars2.githubusercontent.com/u/1171298?v=4","gravatar_id":"","url":"https://api.github.com/users/lifetyper","html_url":"https://github.com/lifetyper","followers_url":"https://api.github.com/users/lifetyper/followers","following_url":"https://api.github.com/users/lifetyper/following{/other_user}","gists_url":"https://api.github.com/users/lifetyper/gists{/gist_id}","starred_url":"https://api.github.com/users/lifetyper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lifetyper/subscriptions","organizations_url":"https://api.github.com/users/lifetyper/orgs","repos_url":"https://api.github.com/users/lifetyper/repos","events_url":"https://api.github.com/users/lifetyper/events{/privacy}","received_events_url":"https://api.github.com/users/lifetyper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-12-18T02:36:13Z","updated_at":"2018-02-28T13:28:37Z","closed_at":null,"author_association":"NONE","body":"As I see the GPIO library only handle 8bits of the ADBUS,could it be possible to add ACBUS support in the GPIO part?\r\n\r\nI used to use FTDI library from adafruit but that only works with python2,and I'm sure ACBUS is accessible to software interface."},"comment":{"url":"https://api.github.com/repos/eblot/pyftdi/issues/comments/369238919","html_url":"https://github.com/eblot/pyftdi/issues/79#issuecomment-369238919","issue_url":"https://api.github.com/repos/eblot/pyftdi/issues/79","id":369238919,"user":{"login":"eblot","id":172423,"avatar_url":"https://avatars1.githubusercontent.com/u/172423?v=4","gravatar_id":"","url":"https://api.github.com/users/eblot","html_url":"https://github.com/eblot","followers_url":"https://api.github.com/users/eblot/followers","following_url":"https://api.github.com/users/eblot/following{/other_user}","gists_url":"https://api.github.com/users/eblot/gists{/gist_id}","starred_url":"https://api.github.com/users/eblot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eblot/subscriptions","organizations_url":"https://api.github.com/users/eblot/orgs","repos_url":"https://api.github.com/users/eblot/repos","events_url":"https://api.github.com/users/eblot/events{/privacy}","received_events_url":"https://api.github.com/users/eblot/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T13:28:37Z","updated_at":"2018-02-28T13:28:37Z","author_association":"OWNER","body":"/CS are supposed (at least with PyFtdi) be in-order, starting from the first pin after the three mandatory SPI signals (AD0/AD1/AD2). If you do not use AD3 for /CS, but you use AD4 for the first /CS signal, AD3 is still reserved for another /CS and cannot be re-used for GPIOs, i.e. in your case:\r\n  * AD0: SCLK\r\n  * AD1: MOSI\r\n  * AD2: MISO\r\n  * AD3: N.C.\r\n  * AD4: /CS\r\n  * AD5,AD6,AD7: GPIOs\r\n  * AC0,AC1,AC2,AC3: GPIOs\r\n\r\nYou still need to declare 2 /CS signal, and only use the second one, i.e.\r\n\r\n     self._spi = SpiController(cs_count=2)  # AD3, AD4\r\n     port = self._spi.get_port(1, freq=6E6, mode=3)  # port 0 is AD3, not used\r\n\r\nthen if you want to re-use the SPIO GPIO unit test, you need to perform the test on only 3 pins instead of 4, as there are only 3 AD pins available for GPIO, i.e. something roughly like this:\r\n  \r\n     ad_pins = ((1 << 3) - 1) << 5  # AD5-AD7 as input\r\n     ac_pins = ((1 << 3) - 1) << 9  # AC1-AC3 as output\r\n     io_pins = ad_pins | ac_pins\r\n\r\n     # ...\r\n\r\n     for ac_ in range(1 << 3):  # only 3 pins\r\n        ac = ac_ << 1           # skip LSB (AD4/AC0)\r\n        # ...\r\n\r\nwith:\r\n   * AD5 connected to AC1\r\n   * AD6 connected to AC2\r\n   * AD7 connected to AC3\r\n   * AC0 not connected\r\n"}}
{"actor":{"display_login":"eblot"}}