TOP Contributors

  1. MIKROE (2641 codes)
  2. Alcides Ramos (347 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 (136216 times)
  2. FAT32 Library (69477 times)
  3. Network Ethernet Library (55703 times)
  4. USB Device Library (45989 times)
  5. Network WiFi Library (41638 times)
  6. FT800 Library (40779 times)
  7. GSM click (28787 times)
  8. PID Library (26327 times)
  9. mikroSDK (26051 times)
  10. microSD click (25138 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: 17993 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

USB-C Sink 3 click

0

USB C Sink 3 Click is a compact add-on board with a standalone autonomous USB power delivery controller. This board features the AP33771, a high-performance USB PD sink controller from Diodes Incorporated. It supports dead battery mode to allow a system to be powered from an external source directly, establishes a valid source-to-sink connection, and negotiates a USB power delivery (PD) contract with a PD-capable source device. It also supports a flexible PD3.0 and PPS for applications that require direct voltage and current requests, with fine-tuning capabilities.

[Learn More]

Angle 5 click

0

Angle 5 Click is a compact add-on board that detects the absolute angular position of a permanent magnet, typically a diametrically magnetized cylinder on a rotating shaft.

[Learn More]

Power/Reset click

0

Power/Reset Click is equipped with two capacitive touch pads on a single click board™.

[Learn More]