TOP Contributors

  1. MIKROE (2662 codes)
  2. Alcides Ramos (357 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137051 times)
  2. FAT32 Library (70177 times)
  3. Network Ethernet Library (56051 times)
  4. USB Device Library (46371 times)
  5. Network WiFi Library (41991 times)
  6. FT800 Library (41324 times)
  7. GSM click (29083 times)
  8. mikroSDK (26522 times)
  9. PID Library (26465 times)
  10. microSD click (25449 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

ETH click

Rating:

0

Author: MIKROE

Last Updated: 2019-07-30

Package Version: 1.0.0.1

mikroSDK Library: 1.0.0.0

Category: Ethernet

Downloaded: 18199 times

Followed by: 1 user

License: MIT license  

Example shows how to use the ENC28J60:<br/>
the board will reply to ARP & ICMP echo requests<br/>
the board will reply to UDP requests on any port :<br/>
returns the request in upper char with a header made of remote host IP & port number<br/>

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "ETH click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "ETH click" changes.

Do you want to report abuse regarding "ETH click".

  • Information
  • Comments (1)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

ETH click board

ETH click board

Front and back view of ETH click board designed in mikroBUS form factor. mikroBUS is specially designed pinout standard with SPI, I2C, Analog, UART, Interrupt, PWM, Reset and Power supply pins.

View full image

Library Description

The library covers necessary functions for the usage of the ETH Click board.
It allows user to enable, disable and reset the device, also, user can check the interrupt state.

Key functions:

  • uint8_t eth_checkInrerrupt() - Function checks the state of the interrupt pin.
  • void eth_reset() - Function is used to reset the device.
  • void eth_enable() - Function is used to enable the device.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes SPI module, LOG and GPIO structures, sets CS and RST pins as output and INT pin as input.
  • Application Initialization - Initalizes SPI driver.
  • Application Task - This is an example that shows the capabilities of the ETH click by establishing mini web server that shows greating message.
void applicationTask()
{
    SPI_Ethernet_doPacket();
}

Additional Functions :

  • uint16_t SPI_Ethernet_UserTCP( char *remoteHost, uint16_t remotePort, uint16_t localPort, uint16_t reqLength, uint8_t *flags ) - This is TCP module
     routine. It is internally called by the library. The user accesses to the TCP/HTTP request by using some of the SPI_Ethernet_get routines.
     The user puts data in the transmit buffer by using some of the SPI_Ethernet_put routines. The function must return the length in bytes of the TCP/HTTP
     reply, or 0 if there is nothing to transmit. If there is no need to reply to the TCP/HTTP requests, just define this function with return(0)
     as a single statement.
  • uint16_t SPI_Ethernet_UserUDP( char *remoteHost, uint16_t remotePort, uint16_t destPort, uint16_t reqLength, uint8_t *flags ) - This is UDP module
     routine. It is internally called by the library. The user accesses to the UDP request by using some of the SPI_Ethernet_get routines. The user puts data
     in the transmit buffer by using some of the SPI_Ethernet_put routines. The function must return the length in bytes of the UDP reply, or 0 if nothing
     to transmit. If you don't need to reply to the UDP requests, just define this function with a return(0) as single statement.

Other mikroE Libraries used in the example:

  • SPI
  • SPI_Ethernet
  • Conversions

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

ETH click board schematics

ETH click board schematics

Board is designed to use 3.3V power supply only.

View full image

ALSO FROM THIS AUTHOR

1-Wire Switch click

0

1-Wire Switch Click is a compact add-on board that allows you to switch a device remotely using a 1-wire signal. This board features the DS2413, a dual-channel programmable I/O 1-Wire switch from Analog Devices.

[Learn More]

ATA6571 click

5

ATA6571 Click is a compact add-on board that contains a transceiver designed for high-speed CAN applications. This board features the ATA6571, a standalone high-speed CAN FD transceiver that interfaces a CAN protocol controller and the physical two-wire CAN bus from Microchip.

[Learn More]

UT-S 7-SEG B 2 click

0

UT-S 7-SEG B 2 Click is a compact add-on board that presents an easy solution for adding a numeric or hexadecimal display to your application. This board features the TLC5947, a constant-current sink LED driver from Texas Instruments, alongside six ultra-thin blue single-digit numeric displays, the JSS-3011BUB-21. The displays are small in size (0.39 inches in height) and can display letters, numbers, and symbols in a highly readable form. The host MCU can control the light intensity of the blue segments of the display.

[Learn More]