MCP23017 configuring reading and writing remote IO
masselon
Posts: 51
in Propeller 1
Helo for all
I am trying to run the MCP23017Driver Erlend Fj. 2015 object but it didn´t execute the code line: value:= bus.CallChip(Chip<<1) - (line 81).
It stop in line 79. I would like to know how I solve that.
Thanks in advance.
Comments
You might consider posting the code giving you trouble -- not everyone has all objects (I don't have any by Erlend).
I haven't used this driver in a long time and I don't have an MCP23017 to test with, but you're free to give it a go. I also included an I2C bus scanner project that can help you verify connections.
Thank you very much Jon
I will test it and surelly it will be very mach instructive.
Thank you again
I know nothing about the driver but you do have the addressing set-up correctly, right?
In BASIC, for example:
Craig
In my driver the device type is pre-defined -- and already left-shifted to accommodate the R/W bit (which is why my address is $40 vs $20)
From the MCP23017 datasheet:
Calls in my driver include the device address bits; that way you only need one object to deal with up to eight MCP23017s (I've only ever used two in a project).
Here is a code snippet for the MCP23s08. The MCP23s17 is a little different and the MCP2308 is totally different. Hope this helps though.
It has been awhile since I used this, so you are on your own. Best.