Datasheet

ENC28J60
DS39662E-page 26 . 2006-2012 Microchip Technology Inc.
4.2 SPI Instruction Set
The operation of the ENC28J60 depends entirely on
commands given by an external host controller over the
SPI interface. These commands take the form of
instructions, of one or more bytes, which are used to
access the control memory and Ethernet buffer spaces.
At the least, instructions consist of a 3-bit opcode,
followed by a 5-bit argument that specifies either a
register address or a data constant. Write and bit field
instructions are also followed by one or more bytes of
data.
A total of seven instructions are implemented on the
ENC28J60. Tab l e 4- 1 shows the command codes for
all operations.
TABLE 4-1: SPI INSTRUCTION SET FOR THE ENC28J60
Instruction
Name and Mnemonic
Byte 0 Byte 1 and Following
Opcode Argument Data
Read Control Register
(RCR)
000aaaaa N/A
Read Buffer Memory
(RBM)
00111010 N/A
Write Control Register
(WCR)
010aaaaad d d d d d d d
Write Buffer Memory
(WBM)
01111010d d d d d d d d
Bit Field Set
(BFS)
100aaaaad d d d d d d d
Bit Field Clear
(BFC)
101aaaaad d d d d d d d
System Reset Command (Soft Reset)
(SRC)
11111111 N/A
Legend: a = Control Register Address, d = Data Payload