You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 8, 2026. It is now read-only.
now i don't/haven't used this library but it appears to me that you have a few errors.
your defined address for DEFVALB is incorrect and should be 0x07 rather than DEFVALB = 0x06 which is actually the address of DEFVALA
Also attempting to read a single hw register, your r/w is setup for buffer 3 and then returning buffer 4?
public static byte ReadRegister8(byte register)
{
// This function will read a single register, and return it
WriteBuffer3[0] = (BaseAddR | (Address << 1)); // Send the MCP23S17 opcode, chip address, and read bit
WriteBuffer3[1] = register;
spi0.TransferFullDuplex(WriteBuffer3, ReadBuffer3);
return ReadBuffer4[2];
// convertToInt(readBuffer); // Return the constructed word, the format is 0x(register value)
now i don't/haven't used this library but it appears to me that you have a few errors.
your defined address for DEFVALB is incorrect and should be 0x07 rather than DEFVALB = 0x06 which is actually the address of DEFVALA
Also attempting to read a single hw register, your r/w is setup for buffer 3 and then returning buffer 4?
}
HastPiControl/Hastarin.Devices.MCP23S17/MCP23S17.cs