Homepage Wiki Forum Buy

RS-485

From GNUBLIN

severity (level) requirement Gnublin family
Gnublin logo advanced.png load kernel drivers, configure/use serial interface all

Contents


RS485 Modul

In addition to the other modules for Gnublin now there is also a RS485 module that extends the Gnublin by two RS485 interfaces.

Rs485modul.jpg


Control with Gnublin Distribution

The driver for the module and the software picocom is in the latest version of the Gnublin Distribution (from 2/21/13) already included in the root file system.

The control of the module works as follows:


load the module

First of all, the module must be plugged in and the Gnublin have to be started. Then you can already load the driver with the following command:

modprobe sc16is7x2

Then two new device files will be created:

  • /dev/eser0
  • /dev/eser1

The device-File eser0 belongs to the pins on the side of the oscillator and the pins eser1 on the other side.

start picocom

At the Gnublin start picocom with the following instruction:

picocom -b 115200 /dev/eser0

or

picocom -b 115200 /dev/eser1


terminate picocom

To terminate picocom on the Gnublin, you should be sure, that you have another terminal programm on your host computer.

This is necessary for the following reason:

If you are connected to the Gnublin by picocom and start another instance of picocom on the Gnublin, you can not terminate the session without problems. The problem is the result of the keyboard shortcut (ctrl + A, ctrl +X), which terminates both picocom connections. This has the consequence that the connection is terminated to the Gnublin but picocom on Gnublin continues.

Here comes the second terminal program into play, I recommend the program hterm from here.

After you downloaded the correct version, you could run the file. Then you should do the following configuration.

Hterm1.jpg

It is important to choose the right device (connection to the Gnublin). If everything fits, press the button Connect.

After that, on the bottom part of the programm change the datatype from ASC to DEC:

Hterm2.jpg

Now type in the box next to the data type selection, the number 1 and confirm with Enter. Then tap the number 24 and confirm again withEnter.

Now picocom should be terminated on the Gnublin and you can reuse it as usual.

If you want to use another terminal program, you simple have to send an decimal '1 'followed by a decimal '24'.

  • 1 decimal equals STRG+A
  • 24 decimal equals STRG+X
In other languages