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 (136678 times)
  2. FAT32 Library (69913 times)
  3. Network Ethernet Library (55927 times)
  4. USB Device Library (46253 times)
  5. Network WiFi Library (41882 times)
  6. FT800 Library (41133 times)
  7. GSM click (28973 times)
  8. PID Library (26407 times)
  9. mikroSDK (26350 times)
  10. microSD click (25351 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

M-Bus Slave click

Rating:

5

Author: MIKROE

Last Updated: 2020-06-30

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: RS232

Downloaded: 1981 times

Not followed.

License: MIT license  

M-Bus Slave Click is a Click boardâ„¢ equipped with the TSS721A, a single chip transceiver developed for Meter-Bus applications according to EN1434-3 standard, developed by Texas Instruments. The connection to the bus is polarity independent and serves as a slave node in the system.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "M-Bus Slave click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "M-Bus Slave click" changes.

Do you want to report abuse regarding "M-Bus Slave 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

M-Bus Slave Click

M-Bus Slave Click

Native view of the M-Bus Slave Click board.

View full image
M-Bus Slave Click

M-Bus Slave Click

Front and back view of the M-Bus Slave Click board.

View full image

Library Description

The library covers all the necessary functions to control M-BUS click board. Library performs a standard UART interface communication.

Key functions:

  • void mbus_write_byte ( uint8_t input ) - Write Single Byte.
  • uint8_t mbus_read_byte( void ) - Read Single Byte.
  • uint8_t mbus_byte_ready ( void ) - Check for new byte received.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes peripherals.
  • Application Initialization - Initializes UART serial interface and app mode.
  • Application Task - (code snippet) This is an example that demonstrates the use of the M-BUS Click board. In this example, depending on the app mode selected, we send ( receive ) a message to ( from ) the M-BUS Master Click which is connected via cable to M-BUS Click ( slave ). Results are being sent to the Usart Terminal where you can track their changes. All data logs write on USB uart changes approximately for every 2 sec.
void application_task ( )
{
    char tmp;
    uint8_t drdy_flag;

    if ( app_mode == APP_MODE_RECEIVER )
    {
        // RECEIVER - UART polling 

        drdy_flag = mbus_byte_ready( );

        if ( 1 == drdy_flag )
        {
            tmp = mbus_read_byte( );
            mikrobus_logWrite( &tmp, _LOG_BYTE );
        }
    }
    else
    {
        // TRANSMITER - TX each 2 sec
      
        for ( tmp = 0; tmp < 9; tmp++ )
        {
            mbus_write_byte( demo_message_data[ tmp ] );
            mikrobus_logWrite( " >> MESSAGE SENT <<", _LOG_LINE );
            Delay_ms( 100 );
        }
        
        Delay_ms( 2000 );
    }
}

Other mikroE Libraries used in the example:

  • 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

Oximeter2 click

0

Oximeter 2 Click is a compact add-on board perfectly suited for measuring the blood oxygen saturation.

[Learn More]

BATT-MON 3 click

0

BATT-MON 3 Click is a compact add-on board representing an advanced battery monitoring solution. This board features the BQ35100, battery fuel gauge, and end-of-service monitor from Texas Instruments. The BQ35100 provides highly configurable fuel gauging for non-rechargeable (primary) lithium batteries without requiring a forced battery discharge. It uses patented TI gauging algorithms to support the option to replace an old battery with a new one seamlessly. It provides accurate results with ultra-low average power consumption, alongside an I2C interface through which the host can read the gathered data.

[Learn More]

Heart rate 4 click

7

Heart rate 4 click carries the MAX30101 high-sensitivity pulse oximeter and heart-rate sensor from Maxim Integrated. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target MCU over I2C interface, with additional functionality provided by INT pin on the mikroBUS line.

[Learn More]