# \#RTS polarity in RS485 mode

**URL:** <https://forums.digi.com/t/rts-polarity-in-rs485-mode/4964>\
**Category:** NET+OS\
**Tags:** connectcore9p\
**Created:** [October 15, 2012, 3:30pm UTC](https://forums.digi.com/t/rts-polarity-in-rs485-mode/4964 "2012-10-15T15:30:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwalter\_at](https://avatars.discourse-cdn.com/v4/letter/c/3be4f8/32.png) [@cwalter\_at](https://forums.digi.com/u/cwalter_at)\
**Post date:** [October 15, 2012, 3:30pm UTC](https://forums.digi.com/t/rts-polarity-in-rs485-mode/4964/1 "2012-10-15T15:30:03Z")

</div>

Dear Support,

In RS485 mode it seems to me that the #RTS line goes low when data is to be sent. It is possible to make this signal with a different polarity without hardware changes?

We are using RS485 in 2-wire mode and I would like to directly interface the module with our RS485 driver. Of course an inverter is an option but if we can do it by software I would prefer it.

Thanks,  
Christian

---

<div class="post-metadata">

**Author:** ![rdeabill](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@rdeabill](https://forums.digi.com/u/rdeabill)\
**Post date:** [November 13, 2012, 10:16am UTC](https://forums.digi.com/t/rts-polarity-in-rs485-mode/4964/2 "2012-11-13T10:16:24Z")

</div>

Hi,

Bit of a late reply but this is the code I used when I needed to set up the FIM UART on com/5. Had to have a normal Tx operation and an inverted RX for the hardware I was talking to:

#define GPIO\_FUNC\_0 0x0000  
#define GPIO\_FUNC\_1 0x0008  
#define GPIO\_FUNC\_2 0x0010  
#define GPIO\_FUNC\_3 0x0018  
#define GPIO\_FUNC\_4 0x0020  
#define GPIO\_D\_OUT 0x0004  
#define GPIO\_INV 0x0002  
#define GPIO\_PUDIS 0x0001

/\* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
EnablePort5

Description:  
Helper routine to switch the GPIO multiplexer to allow Port5 (FIM1) to  
operate.  
Parameters  
none

Return  
Status

```auto
static int EnablePort5(void)
{
  int state;
  state = NAconfigureGPIOpin(72, GPIO_FUNC_1 | GPIO_INV, 0x01);
  state |= NAconfigureGPIOpin(73, GPIO_FUNC_1, 0x01);

  return (state);
}

Regards
   Roy
```
