arachnidlabs / mcp2210

Python library for interfacing with the MCP2210 USB-SPI interface.
BSD 2-Clause "Simplified" License
26 stars 18 forks source link

sample code #9

Open diginfo opened 10 years ago

diginfo commented 10 years ago

Hi; My apologies, through a lot of trial and error I have managed to solve my initial problems with I/O control.

If I have multiple devices on the network, and have the gpio.pin set as a cs pin, how do I select the pin prior to a data transfer to that the correct device is selected ?

Do I have to do this by defining the pin as an i/o pin and then pull it high/low before and after a data transfer or is there a method that uses the cs pin instead ?

Also, is it possible to do data transfer using hex values i.e: dev.transfer(0x8d,0x14,0xaf)

Makhathini commented 4 years ago

Hi, did you manage to solve your problem? If yes, can you please share. I am in a similar situation at the moment ...