How does it work?
RS485 8 Click is based on the THVD1426, an RS485 transceiver with auto-direction control and ESD protection from Texas Instruments. The THVD1426 has one termination resistor over the A/B that can be enabled over the TERM jumper. The RS485 8 Click comes with the SM712, a 600W asymmetrical TVS diode array from Littelfuse, along with the termination resistor. This diode array is designed to protect the RS485 applications with asymmetrical working voltages from -7V up to 12V, thus making it safe from damage due to electrostatic discharge, fast electrical transients, and lightning-induced surges. Both the diode array and the termination resistor are placed near the RS485 screw terminal, with which you can connect the RS485 8 Click to your application’s other end.
RS485 8 Click uses the UART interface to communicate with the host MCU with commonly used UART RX and TX pins. The auto-direction mode on the RS485 8 Click is set by default and disabled with a pull-down resistor. It can be enabled with the logic HIGH state on the EN pin of the mikroBUS™ socket. You can control the driver and receiver using the data input pin RX by enabling the transceiver.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
RS485
Applications
Can be used for the development of industrial and multi-point applications over long cable runs
On-board modules
THVD1426 – an RS485 transceiver with auto-direction control and ESD protection from Texas Instruments
Key Features
Highly flexible, selectable power and logic voltage levels, half-duplex mode, optional 120Ω termination resistor jumper on bus pins, 600W asymmetrical diode array on bus pins, bus I/O protection, low power consumption, glitch-free power-up/power-down for hot plug-in capability, protection features, and more
Interface
UART
Feature
ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on RS485 8 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | VCC SEL | Left | Power/Logic Voltage Level Selection 3V3/5V: Left position 3V3, Right position 5V |
J1 | TERM | Populated | Termination Resistor Jumper |
RS485 8 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Data Rate | – | – | 12 | Mbps |
ESD Protection | – | ±12 | – | kV |
Software Support
We provide a library for the RS485 8 Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for RS485 8 Click driver.
Key functions
-
rs4858_generic_write
RS485 8 data writing function. -
rs4858_generic_read
RS485 8 data reading function. -
rs4858_enable_device
RS485 8 enable the device function.
Example Description
This example reads and processes data from RS485 8 clicks. The library also includes a function for enabling/disabling the receiver or driver and data writing or reading.
void application_task ( void )
{
#ifdef DEMO_APP_TRANSMITTER
rs4858_generic_write( &rs4858, data_buf, strlen( data_buf ) );
log_info( &logger, "---- Data sent ----" );
Delay_ms( 2000 );
#else
rs4858_process( );
#endif
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.RS4858
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.