RS485 4 Click Board
RS485 4 Click Board
The RS485 4 Click Board™ offers a UART to RS485 signal conversion, featuring the ADM2795E specialised IC with the complete galvanic isolation. Digital input and output signals are transmitted across the isolation barrier by using the ICoupler', an IC scale transformer technology, which allows signals to be magnetically coupled across the isolation barrier within the IC, providing galvanic isolation for up to 5KV and data transfer rates up to 2.5Mbps.
The ADM2795E is designed as a very robust and reliable UART to RS485 transceiver, allowing it to be used in very harsh industrial or other noisy environments.
Software Support
We provide a library for the RS485 4 Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
Initializes and defines UART bus driver, and defines driver's functions for comunication (reading and writing) between RS485 4 clicks.
Key Functions
uint8_t rs4854_byteReady()
- Check for new byte receiveduint8_t rs4854_readByte()
- Read Single Bytevoid rs4854_writeByte(uint8_t input)
- Write Single Byte
Example Description
The application is composed of the three sections :
- System Initialization - Initializes UART module and sets RST and CS pin as OUTPUT.
- Application Initialization - Driver intialization.
- Application Task - (code snippet) - Checks if new data byte have received in rx buffer (ready for reading), and if ready than reads one byte from rx buffer. In second case application task writes message data via UART.
void applicationTask() { char tmp; uint8_t rdyFlag; // RECEIVER - UART polling rdyFlag = rs4854_byteReady(); if (1 == rdyFlag) { tmp = rs4854_readByte(); mikrobus_logWrite( &tmp, _LOG_BYTE ); } // TRANSMITTER - TX each 2 sec /* for (tmp = 0; tmp < 9; tmp++) { rs4854_writeByte( MESSAGE_DATA[tmp] ); mikrobus_logWrite( "MESSAGE SENT", _LOG_LINE ); } Delay_ms(2000);*/ }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
UART
Conversions
Additional Notes and Information
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
mikroSDK
The RS485 4 Click Board™ is supported with mikroSDK - MikroElektronika 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.
RS485 4 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.