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 (69875 times)
  3. Network Ethernet Library (55904 times)
  4. USB Device Library (46245 times)
  5. Network WiFi Library (41880 times)
  6. FT800 Library (41115 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

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: 2455 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

WiFi ESP click

2

WiFi ESP click carries the ESP-WROOM-02 module that integrates ESP8266EX. The click is designed to run on a 3.3V power supply. It communicates with the target microcontroller over UART interface and the following pins on the mikroBUS line: RST, CS.

[Learn More]

TempHum 4 click

0

Temp&Hum 4 click is a smart environmental temperature and humidity sensor Click board™.

[Learn More]

Joystick 2 click

0

Joystick 2 Click is a smart navigation key concept based on SKRHABE010 by Alps, a 4-direction joystick switch with Center-push Function.

[Learn More]