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 (136652 times)
  2. FAT32 Library (69876 times)
  3. Network Ethernet Library (55904 times)
  4. USB Device Library (46245 times)
  5. Network WiFi Library (41880 times)
  6. FT800 Library (41116 times)
  7. GSM click (28968 times)
  8. PID Library (26404 times)
  9. mikroSDK (26333 times)
  10. microSD click (25345 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

DTMF Generator click

0

DTMF Generator Click is a compact add-on board that generates DTMF (Dual-Tone Multi-Frequency) signals designed for MCU interfaces. This board features the HT9200A, a dual-tone multi-frequency decoder mostly used in mobile communications systems from Holtek Semiconductor Inc.

[Learn More]

BroadR Reach click

5

BroadR-Reach click brings the industry grade communication standard to the mikroBUSâ„¢, which is built to be used in an Ethernet-based open network.

[Learn More]

mikromedia for XMEGA - Examples

5

Set of examples for mikromedia for XMEGA.. Provided examples demonstrate working with mikromedia's various features and modules:

- Accelerometer
- MMC SD card
- MP3
- Serial Flash
- TFT
- Touch Panel
- USB UART

[Learn More]