Mikroelektronika MIKROE-724 データシート

ページ / 726
500
mikoBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
SPI Ethernet ENC24J600 Library
The 
ENC24J600 
is a stand-alone Ethernet controller with an industry standard Serial Peripheral Interface (SPI). It is 
designed to serve as an Ethernet network interface for any controller equipped with SPI. 
The 
ENC24J600
  meets  all  of  the  IEEE  802.3  specifications  applicable  to  10Base-T  and  100Base-TX  Ethernet.  It 
incorporates a number of packet filtering schemes to limit incoming packets. It also provides an internal, 16-bit wide 
DMA module for fast data throughput and hardware assisted IP checksum calculations. Communication with the host 
controller is implemented via two interrupt pins and the SPI, with data rates of 10/100 Mb/s. Two dedicated pins are 
used for LED link and network activity indication.
This library is designed to simplify handling of the underlying hardware (
ENC24J600
). It works with any dsPIC30/33 
and PIC24 with integrated SPI and more than 4 Kb ROM memory. 38 to 40 MHz clock is recommended to get from 8 
to 10 Mhz SPI clock, otherwise dsPIC30/33 and PIC24 should be clocked by 
ENC24J600
 clock output due to its silicon 
bug in SPI hardware. If you try lower dsPIC30/33 and PIC24 clock speed, there might be board hang or miss some 
requests.
SPI Ethernet ENC24J600 library supports: 
 
- IPv4 protocol. 
 
- ARP requests. 
 
- ICMP echo requests. 
 
- UDP requests. 
 
- TCP requests (no stack, no packet reconstruction). 
 
- ARP client with cache. 
 
- DNS client. 
 
- UDP client. 
 
- DHCP client. 
 
- packet fragmentation is 
NOT supported. 
Important
- Global library variable 
SPI_Ethernet_24j600_userTimerSec
 is used to keep track of time for all client  
  implementations (ARP, DNS, UDP and DHCP). It is user responsibility to increment this variable each second in it’s  
  code if any of the clients is used. 
- For advanced users there is 
__EthEnc24j600Private.mbas
 unit in Uses folder of the compiler with description  
  of all routines and global variables, relevant to the user, implemented in the SPI Ethernet ENC24J600 Library. 
- The appropriate hardware SPI module must be initialized before using any of the SPI Ethernet ENC24J600 library  
  routines. Refer to SPI Library. 
- For MCUs with multiple SPI modules it is possible to initialize them and then switch by using the 
SPI_Set_ 
 Active()
 routine. 
Library Dependency Tree