how_to_connect_ripdraw_7_gpu_to_the_serial_interface_of_the_beagle_bone_black

How to Interface the RipDraw 7" GPU to the serial interface of the BeagleBone Black

This documentation provides guidance on how to interface the RipDraw 7“ GPU to the BeagleBone Black serial ports. In these examples, the BeagleBone Black is running the following OS and version. In general, this guide will apply to other Linux OS with possible minor modifications to the exact syntax for commands and initialization of the serial ports.

#lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.4 (wheezy)
Release:        7.4
Codename:       wheezy

BeagleBone Black UARTs hardware

The BeagleBone Black has six built-in UARTs, knows as UART0, UART1, UART2, UART3, UART4 and UART5.

UART0 is a reserved/dedicated as the system console and should not be as a RipDraw interface.

UART2 shares the same pins with the SPI interface, if you enable UART2, the SPI driver will not work.

UART3 is only has transmit capabilities and should not be used as RipDraw interface.

This leaves UART1, UART2, UART4 and UART5 that can be used as a RipDraw serial interfaces.

UART RXTX CTSRTSLogical DeviceRemark
UART0J1_4J1_5 /dev/ttyO0System console
UART1 P9_26 P9_24 P9_20 P9_19 /dev/ttyO1
UART2 P9_22 P9_21 P8_37 P8_38 /dev/ttyO2 Shares pins 21, 22 with SPI
UART3 P9_42 P8_36 P8_34 /dev/ttyO3 TX only
UART4 P9_11 P9_13 P8_35 P8_33 /dev/ttyO4
UART5 P8_38 P8_37 P8_31 P8_32 /dev/ttyO5

p8_p9_uart_bbb.jpg

Enabling UARTs/Logical Devices on BeagleBone Black

On the BeagleBone Black, only the /dev/ttyO0 is enabled by default. The other serial ports must be enabled before they can be used.

Add the following lines to the uEnv.txt file to enable the UARTs

#Enable Serial ports 1,4 and 5.  0 is automatically enabled, don't enable serial port 2, if you want SPI to be enabled
optargs=capemgr.enable_partno=BB-UART1,BB-UART4,BB-UART5

After rebooting, the logical devices should be present and enabled in the system

# ls -l /dev/ttyO*
crw-rw---- 1 root tty     248, 0 Apr 23 20:20 /dev/ttyO0
crw-rw---T 1 root dialout 248, 1 Jan  1  2000 /dev/ttyO1
crw-rw---T 1 root dialout 248, 4 Jan  1  2000 /dev/ttyO4
crw-rw---T 1 root dialout 248, 5 Jan  1  2000 /dev/ttyO5

Testing The BeagleBone Black UARTs

The UARTs can be tested by connecting the RX of one UART to the TX of another UART and invoking the cat command. For example, to connect /dev/ttyO4 to /dev/ttyO1 in full duplex, make the following connections on the BeagleBone Black.

UART4_RXD P9_11 ←→ UART1_TXD P9_24

UART4_TXD P9_13 ←→ UART1_RXD P9_26

Then open two terminal sessions to the BeagleBone Black. First, in one session use the cat command to receive, in this case /dev/ttyO1 is the receiving device.

# cat /dev/ttyO1

In the second session, use the cat command to send any ascii data file you have handy. In this case /dev/ttyO4 is sending and the data should appear on the terminal session of the receiving device.

# cat any_ascii_data__file /dev/ttyO4

RipDraw 7" GPU Serial Interfaces

The RipDraw 7” GPU is shipped with the USB interface enabled and can be reconfigured to receive commands on the Low Voltage Serial Interface or the RS232 Serial Interface. The BeagleBone Black alone can only interface to the RipDraw 7“ Low Votage Serial Interface. However the BeagleBone Black low voltage serial interfaces can be driven up to RS232 levels using the appropriate Beagle Bone cape.

Configure the RipDraw 7" GPU to communicate on the Low Voltage Serial Interface

Set J6 Interface Selection for Commands from Low Voltage Serial Interface

Jumper J6 tells RipDraw what connector is to be used for communications to host computer. All open selects the USB port.

PinsJumperDescription
1-2SHORTLow Voltage Serial Interface for commands on J7
3-4OPENRS232 Serial Interface for commands on J8
5-6OPENSerial Peripheral Interface (SPI) for commands on J9
7-8OPENUnused

Set J4 Interface Voltage Selection for 3.3 Volts

Jumper J4 selects the voltage to be used on the serial interface

PinsJumperDescription
1-2SHORT3.3V IO voltage
3-4OPEN5V IO voltage

Set J5 Serial Interface Baud Rate Selection to 115200

The jumper used to select the baud rate the serial interface. All open selects 115200 baud. The BeagleBone Black is defaulted to 115200.

PinsJumperDescription
1-2OPEN57600
3-4OPEN38400
4-6OPEN19200
7-8OPEN9600

Connect Tx and Rx lines of Low Voltage Serial Interface J7 to Beagle Bone Black UART

For this example, we will use the BeagleBone Black UART4 /dev/ttyO4

RipDraw J4 PinNameDescription BeagleBone Black Pin
1 TX Serial data output signal from RipDraw to HostUART4_RXD P9_11
2 RX Serial data input signal to RipDraw from HostUART4_TXD P9_13
3 RESETActive low to reset the RipDraw board no connection
4 GND Ground DGND P9_1

Configure the RipDraw 7" GPU to communicate on the RS232 Voltage Serial Interface

Set J6 Interface Selection for Commands from RS232 Serial Interface

Jumper J6 tells RipDraw what connector is to be used for communications to host computer. All open selects the USB port.

PinsJumperDescription
1-2OPENLow Voltage Serial Interface for commands on J7
3-4SHORTRS232 Serial Interface for commands on J8
5-6OPENSerial Peripheral Interface (SPI) for commands on J9
7-8OPENUnused

Set J4 Interface Voltage Selection for 3.3 Volts

Jumper J4 selects the voltage to be used on the serial interface

PinsJumperDescription
1-2OPEN3.3V IO voltage
3-4OPEN5V IO voltage

Set J5 Serial Interface Baud Rate Selection to 115200

The jumper used to select the baud rate the serial interface. All open selects 115200 baud. The BeagleBone Black is defaulted to 115200.

PinsJumperDescription
1-2OPEN57600
3-4OPEN38400
4-6OPEN19200
7-8OPEN9600

Connect Tx and Rx lines of RS232 Serial Interface J8 to BeagleBone UART Cape

The BeagleBone Black alone cannot drive the UARTS at RS232 levels and a BeagleBone UART Cape is required to bring the low voltage serial interface signals up to RS232 levels. In this document, we used the BeagleBone Black RS-232 Serial Micro-Cape (Model Number: CBB-TTL-232) from Logic Supply to drive UART4 at RS232 levels. The user must reconfigure the Micro-Cape to drive UART4.

RipDraw J4 PinNameDescription BeagleBone Black RS-232 Serial Micro-Cape Pin
1 TX Serial data output signal from RipDraw to HostP1 3
2 RX Serial data input signal to RipDraw from HostP1 5
3 RESETActive low to reset the RipDraw board no connection
4 GND Ground P1 9
BBB LogicDesign PI pinout

logicdesignrs232p1.jpg

RipDraw 7" GPU J8 RS232 pin orientation is the same as the J7 low voltage serial

ripdrawgpu_j7_pin_same_as_j8.jpg

Last modified: 2015/06/09 12:24

Page Tools