TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 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 (136549 times)
  2. FAT32 Library (69743 times)
  3. Network Ethernet Library (55847 times)
  4. USB Device Library (46186 times)
  5. Network WiFi Library (41804 times)
  6. FT800 Library (40994 times)
  7. GSM click (28926 times)
  8. PID Library (26385 times)
  9. mikroSDK (26288 times)
  10. microSD click (25301 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 6 click

Rating:

5

Author: MIKROE

Last Updated: 2020-03-03

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: RS485

Downloaded: 3034 times

Not followed.

License: MIT license  

RS485 6 Click is offers a half-duplex RS-485 communication with integrated surge protection, which can be used as an interface between the TTL level UART and the RS485 communication bus. It is based on THVD1429DT, a transceiver from Texas Instruments with signaling rate of up to 20 Mbps.

No Abuse Reported

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

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

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

RS485 6 Click

Native view of the RS485 6 Click board.

View full image
RS485 6 Click

RS485 6 Click

Front and back view of the RS485 6 Click board.

View full image

Library Description

Library provides functions for comunication via UART module, and contol over RE and DE pins.

Key functions:

  • void rs4856_write_byte ( uint8_t input ) - Write single byte of data
  • uint8_t rs4856_read_byte( ) - Read single byte of data
  • uint8_t rs4856_byte_ready ( ) - .

Examples description

The application is composed of three sections :

  • System Initialization - Intializes UART module
  • Application Initialization - Driver intialization
  • Application Task - Choose one mode (read or write) of task. If you reading it checks if data is ready to be read and then reads one byte and if you are wiriting send data via UART.
void application_task ( )
{
    char tmp;

    if ( app_mode == APP_MODE_RECEIVER )
    {
        // RECEIVER - UART polling 
        rs4856_re_pin_set( RS4856_PIN_STATE_LOW );
        rs4856_de_pin_set( RS4856_PIN_STATE_LOW );

        drdy_flag = rs4856_byte_ready( );

        if ( 1 == drdy_flag )
        {
            tmp = rs4856_read_byte( );
            mikrobus_logWrite( &tmp, _LOG_BYTE );
        }
    }
    else
    {
        // TRANSMITER - TX each 2 sec
        rs4856_re_pin_set( RS4856_PIN_STATE_HIGH );
        rs4856_de_pin_set( RS4856_PIN_STATE_HIGH );
      
        for ( tmp = 0; tmp < 9; tmp++ )
        {
            rs4856_write_byte( demo_message_data[ tmp ] );
        }
        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

MPU 9DOF click

1

Simple example which demonstrates usage of the MPU 9 DOF Click board with MPU-9150 module which integrates the accel, gyro and magnetic sensors. STM32F407VG on mikromedia for STM32 M4 is used as a host for this example project.

[Learn More]

Ozone 2 click

10

Ozone 2 click carries an MQ131 sensor for Ozone (O3). The sensor outputs an analog voltage, which is converted by the onboard MCP3551 22-bit ADC converter or it is sent to the microcontroller via AN pin on the mikroBUSâ„¢, depending on the position of ADC SEL. jumper. The click is designed to run on 5V power supply.

[Learn More]

RTC Demo

0

The application demonstrates RTC SDK functionality.

[Learn More]