TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (351 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 (136646 times)
  2. FAT32 Library (69857 times)
  3. Network Ethernet Library (55899 times)
  4. USB Device Library (46236 times)
  5. Network WiFi Library (41869 times)
  6. FT800 Library (41099 times)
  7. GSM click (28953 times)
  8. PID Library (26403 times)
  9. mikroSDK (26321 times)
  10. microSD click (25334 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

EnOcean 4 click

Rating:

5

Author: MIKROE

Last Updated: 2019-07-17

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Sub-1 GHz Transceivers

Downloaded: 2694 times

Not followed.

License: MIT license  

EnOcean 4 Click carries a ultra-low power TCM515U transceiver gateway module which operates at 902MHz radio band, perfectly suited for the realization of transceiver gateways, actuators and controllers for systems communicating based on the EnOcean radio standard.

No Abuse Reported

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

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

Do you want to report abuse regarding "EnOcean 4 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
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

EnOcean 4 click

EnOcean 4 click

Native view of the EnOcean 4 click board.

View full image
EnOcean 4 click

EnOcean 4 click

Front and back view of the EnOcean 4 click board.

View full image

Library Description

This library allows user to perform an ESP3 (EnOcean Serial Protocol 3) communication. User can send packet data, which can consist of the commands, telegrams, messages... The library also can be used to check the response from the modul. When the response is ready, the library sets a flag. For more details check documentation.

Key functions:

  • T_ENOCEAN4_RETVAL enocean4_procces( void )- This function performs a response proccesing and calls handler function if response is valid.
  • T_ENOCEAN4_RETVAL enocean4_responseReady( void )- This function checks the response ready flag and if flag is set, clears a flag.
  • T_ENOCEAN4_RETVAL enocean4_sendPacket( T_enocean4_packet *packet )- This function allows user to send a valid packet data to the module by using UART interface.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes peripherals and pins.
  • Application Initialization - Initializes UART interface and interrupt, and prepares module for telegram sending and receiving. Also determines the working mode of the module, to be transmitter or receiver.
  • Application Task - (code snippet) Transmitter case: Sends message 1 and 2 to another module selected by Destination ID in the message structure. After each sent message waits to get answer (response) from another module. Receiver case: Waits to get message from another module and after that sends the determined answer on the received message. The all responses, messages and answers will be sent to the uart terminal.
void applicationTask()
{
    if (device_mode == RECEIVER)
    {
        mikrobus_logWrite( "Telegram receiving...", _LOG_LINE );
        checkResponse();
        mikrobus_logWrite( "***********************************", _LOG_LINE );
        Delay_ms( 5000 );

        mikrobus_logWrite( "Telegram sending...", _LOG_LINE );
        sendTelegram( &_answer1[0], _ENOCEAN4_RORG_ADT );
        checkResponse();
        mikrobus_logWrite( "***********************************", _LOG_LINE );

        mikrobus_logWrite( "Telegram receiving...", _LOG_LINE );
        checkResponse();
        mikrobus_logWrite( "***********************************", _LOG_LINE );
        Delay_ms( 5000 );

        mikrobus_logWrite( "Telegram sending...", _LOG_LINE );
        sendTelegram( &_answer2[0], _ENOCEAN4_RORG_ADT );
        checkResponse();
        mikrobus_logWrite( "***********************************", _LOG_LINE );
    }
    else if (device_mode == TRANSMITTER)
    {
        mikrobus_logWrite( "Telegram sending...", _LOG_LINE );
        sendTelegram( &_message1[0], _ENOCEAN4_RORG_ADT );
        checkResponse();
        mikrobus_logWrite( "***********************************", _LOG_LINE );

        mikrobus_logWrite( "Telegram receiving...", _LOG_LINE );
        checkResponse();
        mikrobus_logWrite( "***********************************", _LOG_LINE );
        Delay_ms( 5000 );

        mikrobus_logWrite( "Telegram sending...", _LOG_LINE );
        sendTelegram( &_message2[0], _ENOCEAN4_RORG_ADT );
        checkResponse();
        mikrobus_logWrite( "***********************************", _LOG_LINE );

        mikrobus_logWrite( "Telegram receiving...", _LOG_LINE );
        checkResponse();
        mikrobus_logWrite( "***********************************", _LOG_LINE );
        Delay_ms( 5000 );
    }
}

Additional Functions :

  • respMessage - Sends message about the response state.
  • packetType - Sends message about the packet type.
  • makeResponse - Allows user to get a response packet from the driver.
  • logResponse - Allows results to be sent to the uart terminal.
  • sendTelegram - Allows user to send a telegram to the determined destination.
  • checkResponse - Waits until response was ready.
  • interrupt - To catch response from the module.

Other mikroE Libraries used in the example:

  • Conversions
  • UART

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.

ALSO FROM THIS AUTHOR

HallCurrent 3 click

5

Hall current 3 click is a very accurate current measurement Click board, which utilizes the Hall effect to provide a precise and reliable measurement of reasonably high current. Its most distinctive feature is a very low series resistance of only 0.8mΩ, making this device a nearly-perfect ammeter.

[Learn More]

OLED B click

5

OLED B click carries a 96 x 39px blue monochrome passive matrix OLED display. The display is bright, has a wide viewing angle and low power consumption. To drive the display, OLED B click features an SSD1306 controller.

[Learn More]

USB to I2C 2 click

0

USB to I2C 2 Click is a compact add-on board that contains a general-purpose USB to I2C serial interface. This board features the FT201X, a full-speed USB to I2C protocol converter from FTDI. The FT201X converts USB2.0 full-speed to an I2C serial interface capable of operating up to 3.4MBit/s, with low power consumption (typical 8mA). The entire USB protocol is handled on the chip itself, where no USB-specific firmware programming is required. It also has a fully-integrated 2048 byte Multi-Time-Programmable (MTP) memory for storing device descriptors and CBUS I/O user-desirable configuration. This Click board™ includes the complete FT-X series feature set and enables USB to be added into a system design quickly and easily over an I2C interface.

[Learn More]