what are the hex value in MCP2515 SPI instruction set, looks not like address

417 views Asked by At

I read some mcp2515.h files online. There is one part about SPI instruction set, or SPI commands. For example:

#define MCP_CMD_WRITE 0x02
#define MCP_CMD_READ 0x03
#define MCP_CMD_BIT_MODIFY 0x05
#define MCP_CMD_LOAD_TX 0x40
#define MCP_CMD_RTS 0x80
#define MCP_CMD_READ_RX 0x90
#define MCP_CMD_READ_STATUS 0xA0
#define MCP_CMD_RX_STATUS 0xB0
#define MCP_CMD_RESET 0xC0

Those hex 0*xx values look not like address. Or they are microchip defined values?

1

There are 1 answers

0
Steven Guo On BEST ANSWER

They refer to SPI instruction sets. Look under table 12-1. The definitions you are asking about is the instruction format converted to hex. http://ww1.microchip.com/downloads/en/DeviceDoc/21801G.pdf