For your information, there is also a RS485 Cap that is working very well . As he said : " pass the RS485 stucture along with the termios information to setup the port "
On Tue, Apr 29, 2014 at 4:24 PM, <[email protected]> wrote: > > Yes you can use the serial ports for RS485. You will need a UART to RS485 > IC to get the correct voltages. RS485 is a half duplex standard and > therefore has to have a directional pin. This pin can be selected to be any > of the GPIO pins of the Beaglebone Black. Use the UART cape in the device > tree overly to enable the serial port and then pass the RS485 stucture > along with the termios information to setup the port. The structure can be > found in serial.h. If you are planning to use the Modbus protocol over the > RS485 network then you need to make a slight change to the libmodbus source > code. In the file modbus-rtu.c there is a function called > modbus_rtu_set_serial_mode. In the passing argument for the function > include an additional variable int GPIO for the directional pin. In the > firs if statement change the code so that it will now pass the structure of > the RS485 to the port along with the directional pin. Note that you are > using the patched serial.h that comes with the Debian Image for the > Beaglebone Black and not the serial.h that comes as standard with Debian. > After this setup the normal reading and writing functions of the Modbus > library can be used > On Wednesday, November 2, 2011 9:59:05 PM UTC+2, IƱaki Zuloaga Izaguirre > wrote: >> >> I have been reading the documentation for the TI microprocessors and I >> haven't been able to figure out if the serial ports can be used for >> RS485. It seems to me that there is no integrated support for RS485 >> Transmit enable generation, has anybody tried this? You can always >> control the enable with a digital output, but it is very difficult to >> accurately disable the Transmit enable after transmission ends. >> Microprocessors from other companies like the AT91SAM9260 and LPC1768 >> directly support handling the RS485 enable. > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
