arduino_uip icon indicating copy to clipboard operation
arduino_uip copied to clipboard

ENC28j60 bitwise OR 0x80

Open manintheit opened this issue 6 years ago • 0 comments

I have a question regarding library for the enc28j60.h I would appreciate If you could answer my question.

I do not understand why we also do bitwise OR for the some of the registers in the Bank2 and Bank3 with 0x80. You can see the examples below for the MACON1. But I could not find any section indication of combination related to control registers that on the data sheet of the ENC28J60.

#define MACON1 (0x00|0x40|0x80)

===================================================== // Control register definitions are a combination of address, // bank number, and Ethernet/MAC/PHY indicator bits. // - Register address (bits 0-4) // - Bank number (bits 5-6) // - MAC/PHY indicator (bit 7)

======================================================

manintheit avatar Feb 03 '18 14:02 manintheit