BeagleBone RS485 User manual

BEAGLEBONE RS485 CAN CAPE EXPANSION BOARD
User Manual
Getting Ready
Writing the TF Card System Image
Follow the steps below to write the Angstrom into TF card:
1) Extract the system image
Extract the system image file .img.7z by using archiver software like 7z920.exe.
Note: please download the image file from:
LCD CPAE(4.3inch) image for testing
Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.12-beaglebone-2013.05.24-LCD-cape-LCD4.3-
v1.1.img.7z
LCD CPAE(7inch) image for testing
Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.12-beaglebone-2013.05.24-LCD-cape-LCD7-
v1.1.img.7z
MISC CAPE and RS485/CAN CAPE image for testing
Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.12-beaglebone-2013.05.24-MISC-cape-HDMI-
v1.1.img.7z
www.ekt2.com
Electronics Katrangi Trading

2) Format the TF card
Use HPUSBDisk.exe to format the TF card.
Choose the Device as your TF card, File system as FAT32. Then click Start.
Note: the TF card capacity should be 4GB or above!
Use HPUSBDisk.exe to format the TF card
3) Writing the system image
Launch Win32DiskImager.exe, select the extracted system image. Then click write.
Use Win32DiskImager.exe to write the system image
Install USB to UART driver
1) Connect the LCD CAPE with USB TO UART interface to the PC through a USB cable.
Note: You need to install the corresponding driver. Please refer to the respective manuals
of your USB TO UART module.
www.ekt2.com
Electronics Katrangi Trading

Interface definition:
Red: VCC
Black: GND
Green: TXD(connect to RXD)
White: RXD(connect to TXD)
USB to UART Cable
2) Open PL2303_Prolific_DriverInstaller_v1.8.0.exe and install the driver.
3) Launch putty.exe, configure as follows, then click Open.
PuTTY Settings
Note:
Serial line: check the PC "Device Manager" to confirm which COM port should be selected.
Speed: 115200。
Connection type: Serial。
www.ekt2.com
Electronics Katrangi Trading

Enter Bash Shell
1) Insert the TF card into the BeagleBone Black onboard slot, keep pressing down the BOOT button,
power up the board, then release the BOOT button.
2) When the system startups, input "root" to enter Bash Shell environment, now the shell commands
are available to use. All the commands follows are executed here.
Enter Bash Shell
Note: please make sure that you are using the TF card image that we provide, and the
system should boot from TF card (keep pressing down BOOT button, then power up),
otherwise, the testing will fail.
API Source Code
The API source code can be found on /home/xuser/waveshare_demo/API.
LCD CAPE
LCD Display Overview
1. BB_BLACK connector : for connecting BB Black
www.ekt2.com
Electronics Katrangi Trading
www.ekt2.com
Electronics Katrangi Trading

2. 4.3inch LCD interface : for connecting 4.3inch resistive touchscreen LCD
3. DEBUG interface : BB Black debug interface, for connecting serial modules
4. BOOT selection button: Boot from TF card
1. BB_BLACK connector : for connecting BB Black
2. 7inch LCD interface : for connecting 7inch resistive touchscreen LCD
3. DEBUG interface : BB Black debug interface, for connecting serial modules
4. BOOT selection button : Boot from TF card
LCD Display
1) Connect to a LCD
Note: There are two models of LCD CAPE, LCD CAPE (4.3inch) and LCD CAPE (7inch), each
one corresponds our 4.3inch or 7inch resistive touch screen respectively. Some batches of
LCD CAPE provide both interfaces. If the CAPE connected to the LCD by a wrong interface,
it may damage the LCD and the main board.
When using 4.3inch LCD
Download LCD CPAE(4.3inch) image for testing.
Connect BB Black to the 4.3inch LCD.
Connect to the 4.3inch LCD
www.ekt2.com
Electronics Katrangi Trading

When using 7inch LCD
Download LCD CPAE(7inch) image for testing.
Connect BB Black to the 7inch LCD.
Connect to the 7inch LCD
2) The touchscreen should be calibrated when the display mode has been changed:
root@beaglebone:~# rm -rf /etc/pointercal*
root@beaglebone:~# ts_calibrate
root@beaglebone:~# sync
Reboot the system. Note: if the calibration failed, reboot and retry again.
MISC CAPE
MISC CAPE Overview
1. BB_BLACK connector : for connecting BB Black
2. DEBUG interface : BB Black debug interface, for connecting serial modules
3. ONE-WIRE interface: easily connects to ONE-WIRE devices (TO-92 package), such as
temperature sensor (DS18B20), electronic registration number (DS2401), etc.
4. BOOT selection button : Boot from TF card
5. User button : 4 buttons
www.ekt2.com
Electronics Katrangi Trading

6. Buzzer
7. Power indicator
8. User LED : 4 LEDs
9. Potentiometer : AD adjustable potentiometer
10.32.768KHz crystal : for RTC
11.PCF8563 : RTC
12.RTC battery holder : for 3.3V battery
13.RTC power selection jumper
14.RTC I2C selection jumper: select I2C1 OR I2C2
LED
Short the LED jumper, enter:
root@beaglebone:~# test_led
The 4 LEDs will light up one by one, press Ctrl+C to exit.
Buzzer
1) Short the buzzer jumper, enter:
root@beaglebone:~# ls /sys/devices/ocp.3/
You'll find the “pwm_ehrpwm1b.14” as shown:
Find the “pwm_ehrpwm1b.14”
www.ekt2.com
Electronics Katrangi Trading

2) Because the pwm_ehrpwm1b.14's extension is .14. It is needed to add parameter 14 when buzzer
tested.
root@beaglebone:~# test_pwm 14
The buzzer will make sounds in different frequency.
DS18B20
1) Insert the DS18B20 into the 1-WIRE socket, short the 1-WIRE jumper, enter:
root@beaglebone:~#ls /sys/bus/w1/devices/
You will find the "28-00000 57c5948" (the last 7 characters are unique for each DS18B20, it
depends)
2) Execute:
root@beaglebone:~#test_ds18b20 57c5948
The terminal will print the current temperature.
Buttons
1) Execute
root@beaglebone:~# test_key event2
Note: Device file "event2" is based on user‘s device, Not necessarily "event2". You can
execute the following command to view:
root@beaglebone:~# ls /dev/input
Check event device
2) Press any of the onboard buttons, the terminal will show which one has been pressed, press
Ctrl+C to exit.
Note: if the LCD screen was connected while testing joystick/buttons, the LCD screen
seems that it was touched at the same time, it's normal.
www.ekt2.com
Electronics Katrangi Trading

RTC
Confirm that the module is powered by onboard battery.
1) Show system date time:
root@beaglebone:~# date
2) Set system date time:
root@beaglebone:~# date 020809302014.23
3) Set the hardware clock of RTC module:
root@beaglebone:~# hwclock –w –f /dev/rtc1
4) Show the hardware clock of RTC module:
root@beaglebone:~# hwclock –r –f /dev/rtc1
5) Synchronize the hardware clock to system date time:
root@beaglebone:~# hwclock –s –f /dev/rtc1
Synchronize the hardware clock to system date time
6) Power off and reboot, read the hardware clock of RTC module and synchronize to system date time:
root@beaglebone:~# hwclock –r –f /dev/rtc1
www.ekt2.com
Electronics Katrangi Trading

root@beaglebone:~# hwclock –s –f /dev/rtc1
root@beaglebone:~# date
Synchronize to system date time
Now the date time of software and hardware are synchronous.
RS485 CAN CAPE
CAN
Two BeagleBone Black and two RS485/CAN CAPEs are required for this testing. Set jumper to enable
UART1(RXD1, TXD1). Connect two CAN Board to CAN1 interface separately, connect the CANH, CANL
of one module to the CANH, CANL of another module via jumper wires.
1) Configure the baud rate:
root@beaglebone:~#canconfig can0 bitrate 115200 ctrlmode triple-sampling on
2) Enable the CAN device:
root@beaglebone:~# canconfig can0 start
The two CAN devices act as receiver and sender separately. The receiver gets ready to receive data
first, and then the sender starts sending data.
3) Receiver:
root@beaglebone:~# candump can0
www.ekt2.com
Electronics Katrangi Trading
Table of contents
Other BeagleBone Computer Hardware manuals
Popular Computer Hardware manuals by other brands

EMC2
EMC2 VNX Series Hardware Information Guide

Panasonic
Panasonic DV0PM20105 Operation manual

Mitsubishi Electric
Mitsubishi Electric Q81BD-J61BT11 user manual

Gigabyte
Gigabyte B660M DS3H AX DDR4 user manual

Raidon
Raidon iT2300 Quick installation guide

National Instruments
National Instruments PXI-8186 user manual













