arduino rs-485 - comunication

I’m trying to make a program to use a Arduino Uno to communicate via RS-485.
I have all the code correct but my problem is setting the start bit, the parity to even, and the stop bit.
I’m very new in the Arduino programming. I reed other posts but i didn’t understand.

Can anyone help me?

Thank you

You will need to give us some more information like what arduino pins the RS-485 chip is connected too, what library your using (software serial?) and what device you trying to communicate with to determine the correct baud rate, start, data, stop & parity bits.

The arduinos is connected with a SN75176BP, RS-485 connection. I use the RX(pin 0), TX(pin1) and pin 4 as a pin control.
I’m trying to communicate with an inverter. The arduino sends the message(12 bytes message) but the inverter those not respond.
The problem is that I have to set a start bit, a stop bit and the parity bit must be in state “even”. My problem now is how can I type that in the code.
The inverter only respond if you ask something to him and if the parity bit is not in state “even” he does not respond.

Can you help me?

Start and stop bits are a given, that happens automatically although if the device needs > 1 stop bit (very unlikely) you may have to do something. Parity however will cause a problem if it’s not right.

Have a look at section 19.10.4 of the data sheet, it details one of the UART control regs and the bits to set for parity.

It looks like

UCSR0C != (2 << UPM00);

Will set even parity as long as the serial library doesn’t dick with this register once it’s been set up. So do this after the Serial.begin().

There can also be issues with using pins 0 and 1 because they are also connected to the FDI USB chip. You may be better off using SoftwareSerial on two different pins.