TOP Contributors

  1. MIKROE (2659 codes)
  2. Alcides Ramos (356 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 (136987 times)
  2. FAT32 Library (70100 times)
  3. Network Ethernet Library (56023 times)
  4. USB Device Library (46345 times)
  5. Network WiFi Library (41961 times)
  6. FT800 Library (41274 times)
  7. GSM click (29051 times)
  8. mikroSDK (26489 times)
  9. PID Library (26447 times)
  10. microSD click (25412 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

RS485 Isolator 2 click

Rating:

5

Author: MIKROE

Last Updated: 2020-02-05

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: RS485

Downloaded: 2501 times

Not followed.

License: MIT license  

RS485 Isolator 2 Click features ADM2867E a 5.7 kV rms signal and power isolated full duplex RS-485 transceiver. The device also features cable invert pins, allowing the user to quickly correct reversed cable connection on A, B, Y, and Z bus pins while maintaining receiver full receiver fail-safe performance.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "RS485 Isolator 2 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "RS485 Isolator 2 click" changes.

Do you want to report abuse regarding "RS485 Isolator 2 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

RS485 Isolator 2 click

RS485 Isolator 2 click

Native view of the RS485 Isolator 2 click board.

View full image
RS485 Isolator 2 click

RS485 Isolator 2 click

Front and back view of the RS485 Isolator 2 click board.

View full image

Library Description

Initializes and defines UART bus driver, and defines drivers for reading, writing and check for new data between RS485 Isolator 2 clicks. User can also enable or disable both transmiter and receiver, and to invert receiving or transmitting data.

Key functions:

  • void rs485isolator2_write_byte ( uint8_t input ) - Writes single byte.
  • uint8_t rs485isolator2_read_byte( ) - Read received byte.
  • uint8_t rs485isolator2_byte_ready ( ) - Checks is there a new byte received.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes UART module and sets RST, CS, PWM and INT pins as an output.
  • Application Initialization - Initalizes UART driver and makes an initial log.
  • Application Task - (code snippet) This example covers two cases. First case (receiver mode): checks for new data and, if available, reads one byte from rx buffer. Second case (transmiter mode): writes message via UART. An example is setup for noninverted data transmision and receiving.
void application_task ( )
{
    char tmp;
    uint8_t drdy_flag;

    if ( app_mode == APP_MODE_RECEIVER )
    {
        // RECEIVER - UART polling 
        rs485isolator2_re_state( RS485ISOLATOR2_ENABLE_RE );
        drdy_flag = rs485isolator2_byte_ready( );

        if ( 1 == drdy_flag )
        {
            tmp = rs485isolator2_read_byte( );
            mikrobus_logWrite( &tmp, _LOG_BYTE );
        }
        rs485isolator2_re_state( RS485ISOLATOR2_DISABLE_RE );
    }
    else
    {
        // TRANSMITER - TX each 2 sec
        rs485isolator2_de_state( RS485ISOLATOR2_ENABLE_DE );
        for ( tmp = 0; tmp < demo_message_lenght; tmp++ )
        {
            rs485isolator2_write_byte( demo_message_data[ tmp ] );
        }
        rs485isolator2_de_state( RS485ISOLATOR2_DISABLE_DE );
        Delay_ms( 2000 );
    }
}

Other mikroE Libraries used in the example:

  • UART
  • Conversion

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

13DOF 2 click

5

13DOF 2 click is an advanced 13-axis motion tracking Click board, which utilizes two different sensor ICs onboard: BME680, voc, humidity, pressure and temperature sensor and BMX160, a 9-axis sensor consisting of a 3-axis, low-g accelerometer, a low power 3-axis gyroscope and a 3-axis geomagnetic sensor.

[Learn More]

Mikromedia 5 for PIC32MZ Capacitive

0

This project contains demo example for Mikromedia 5 for PIC32MZ Capacitive.

[Learn More]

3D Hall 7 click

5

3D HALL 7 click is a very accurate, magnetic field sensing Click board, used to measure the intensity of the magnetic field across three perpendicular axes.

[Learn More]