VersaLogic Python EBX-11 Reference Manual page 60

Amd lx 800 based sbc with ethernet, video, audio, industrial i/o, and spi
Table of Contents

Advertisement

MOV
MOV
OUT
CALL
;Write 55h to MCP23S17 register GPIOA
MOV
MOV
OUT
MOV
MOV
OUT
MOV
MOV
OUT
CALL
BUSY: MOV
IN
AND
JNZ
EBX-11 Reference manual
DX, 1DDh
AL, 40h
;SPIDATA3: MCP23S17 write command
DX, AL
BUSY
;Poll busy flag to wait for SPI transaction
DX, 1DBh
AL, 55h
;SPIDATA1: data to write
DX, AL
DX, 1DCh
AL, 14h
;SPIDATA2: MCP23S17 register address 00h
DX, AL
DX, 1DDh
AL, 40h
;SPIDATA3: MCP23S17 write command
DX, AL
BUSY
;Poll busy flag to wait for SPI transaction
DX, 1D9h
AL, DX
;Get SPISTATUS
AL, 01h
;Isolate the BUSY flag
BUSY
;Loop if SPI transaction not complete
Interfaces and Connectors
54

Advertisement

Table of Contents
loading

Table of Contents