User manual

Table Of Contents
470
mikoC PRO for PIC32
MikroElektronika
Returns Nothing.
Requires Global variables:
- SPI_Ethernet_24j600_CS: Chip Select line
- SPI_Ethernet_24j600_CS_Direction: Direction of the Chip Select pin
must be dened before using this function.
The SPI module needs to be initialized. See the SPIx_Init and SPIx_Init_Advanced routines.
Example
#include “__EthEnc24J600.h”
// mE ethernet NIC pinout
sfr sbit SPI_Ethernet_24j600_CS at RF1_bit;
sfr sbit SPI_Ethernet_24j600_CS_Direction at TRISF1_bit;
// end ethernet NIC denitions
unsigned char myMacAddr[6] = {0x00, 0x14, 0xA5, 0x76, 0x19, 0x3f}; // my MAC
address
unsigned char myIpAddr = {192, 168, 1, 60 }; // my IP addr
SPI1_Init();
SPI_Ethernet_24j600_Init(myMacAddr, myIpAddr, SPI_Ethernet_24j600_MANUAL_
NEGOTIATION & SPI_Ethernet_24j600_FULLDUPLEX & SPI_Ethernet_24j600_
SPD100);
Notes None.