I don't have VSM, but could you post your code so that it can be confirmed that you are using a hi2csetup command and with the correct slave address.
Sure happy to,
I am not sure of what am doing, so to learn I have tried many versions including writei2c commands as well, frustratingly without success.
I am using the new version of VSM
I have mainly been using hi2c commands instead of i2c commands as recommended in manual2
Unfortunately the i2c tutorial focuses on these older commands so is not really a help.
;Code for BASIC test of MCP23017, based from code posted by westaust55
;USING 40X2 ON VSM
SYMBOL mcp23017 = %01000000 ; $0100 A2, A1, A0, R/W all connected to 0V
SYMBOL IODIRA = $00 ; Port A IO Direction register DEFAULT = I/P
SYMBOL IODIRB = $01 ; Port B IO Direction register DEFAULT = I/P
SYMBOL IOCON = $0A ; IO Expander config register - address $0B accesses the same register
SYMBOL GPIOA = $12 ; Port A General purpose register
SYMBOL GPIOB = $13 ; Port B General Purpose register
HI2CSETUP i2cmaster, mcp23017, i2cFAST_8, i2cbyte
; I have tried i2cfast, i2cslow_8,
PAUSE 100
HI2COUT IODIRA, ($FF) ;set all port A pins as inputs (1)
HI2COUT IODIRB, ($00) ;set all port B pins as outputs (0)
PAUSE 100
HI2COUT $12, (%11111111) ; all ON
PAUSE 300
HI2COUT $12, (%00000000) ; all OFF
PAUSE 300
HI2COUT $13, (%11111111) ; all ON
PAUSE 300
HI2COUT $13, (%00000000) ; all OFF
PAUSE 300
Main:
DO
b3 = 1
DO ; LED dot pattern to move left
HI2COUT GPIOB, (b3)
b3 = b3 << 1 ; shift left 1 bit
PAUSE 500
LOOP UNTIL b3 = 0
b3 = 64
DO ; LED dot pattern to move right
HI2COUT GPIOB, (b3)
b3 = b3 >> 1 ; shift right 1 bit
PAUSE 500
LOOP UNTIL b3 = 1
LOOP
Thanks for your help