This example demonstrates the RS485 mode provided by the USART peripherals on SAMV7 Microcontrollers.
Requirements
This example can be used on SAM V71 Xplained Ultra board. Before running, make sure to connect two boards with RS485 lines. The rs485 adapt board(ADM3485ARZ) for this purpose. Match each paired pins of two boards respectively with A to A, B to B and FGND to FGND(the central pin of J3). this part is connect with EK and ADM3485ARZ
- Board 1 Board 2
- TXD0(EXT1 pin14) <->DI TXD0(EXT1 pin14) <->DI
- RXD0(EXT1 pin13) <->RO RXD0(EXT1 pin13) <->RO
- RTS0(EXT1 pin5 ) <->DE RTS0(EXT1 pin5 ) <->DE
- CTS0(EXT1 pin6 ) <->RE CTS0(EXT1 pin6 ) <->RE
- 3.3v 3.3v
- GND GND this part is connect with 2 ADM3485ARZ A <--------------------> A B <--------------------> B PGND <--------------------> PGND
Description
This example connects two boards through RS485 interface. One board acts as the transmitter and the other one as the receiver. It is determined by the sequence the two applications started.
Usage
- Build the program and download it inside the SAM V71 Xplained Ultra board. Please refer to the Getting Started with SAM V71 Microcontrollers.pdf
- Connect a serial cable to the DBGU port on the evaluation kit.
- On the computer, open and configure a terminal application for each board (e.g. HyperTerminal on Microsoft Windows) with these settings:
- 115200 bauds
- 8 data bits
- No parity
- 1 stop bit
- No flow control
- Start application from two boards in sequence. Make sure the second board should NOT be started unless the first board had run to wait for the synchronizing character. The output message in later section would describe this.
- In the terminal window, the following text should appear (values depend on the board and chip used):
-- USART RS485 Mode Example xxx --
-- SAMxxxxx-xx
-- Compiled: xxx xx xxxx xx:xx:xx --
References