Re: Port alias in Port Expanders (MCP23S17)
Why does this not work?
OutA.12=0 doesn't gen an error but it nor the other (OutA.15=0) turns ON an LED?????
Code:
OutA=$FFFE 'Initial value for word var
OutA_hi=OutA.highbyte 'Splits into hibyte
OutA_lo=OutA.lowbyte 'And into low byte of the word var
' OutA_lo.3=0 'Bit mod - WORKS
' OutA_hi.5=0 'Another bit mod - WORKS
OutA.12=0 'Why doesn't this work?
OutA.15=0 'Or this?
OutA_MCPReg = OLATA 'Sets up PORTA output
OutA_DataOut=OutA_lo 'Sets up data to be pushed to the MCP23S17 as the low byte
gosub SEND_OutA_2317 'Send it
pause 10 'Wait a bit
OutA_MCPReg = OLATB 'Sets up PORTB output
OutA_DataOut=OutA_hi 'Sets up data to be pushed to the MCP23S17 as the hi byte
gosub SEND_OutA_2317 'Send it
"If we knew what we were doing, it wouldn't be called research"
- Albert Einstein
Bookmarks