EasyTK1_IO Serial port test

Serial port detail

On EasyTK1-IO there are 2 serial ports:

  • UART1 ( /dev/ttyTHS0 linux device )

    EasyTK1_IO UART1 /dev/ttyTHS0


  • UART2 ( /dev/ttyTHS1 linux device )

    EasyTK1_IO UART2 /dev/ttyTHS1


“U1 VIN” and “U2 VIN” is voltage reference used to setup trasmission level to device I/O level.

You can use a voltage from 1,8 to 5V, it must be the target serial port voltage!

ASCII trasmission with linux console

A very simple trasmission can be done using :

  • stty command to setup serial port
  • echo command to send a string to serial port device file

Open a linux terminal session and setup /dev/ttyTHS0 @ 57600bps baudrate with stty:

stty -F /dev/ttyTHS0 57600

Now you can trasmit a serial string with:

sudo echo -e "EasyTK1_IO" > /dev/ttyTHS0

ECHO test with minicom

Another simple test is echo test connecting UART1 RX and TX between them and using minicom program:

minicom -D /dev/ttyTHS0 -b 57600

In this mode you can see an echo of each pressed key at desidered baudrate.

With CTRL-A X you can exit from minicom.

ASCII file trasmission

Now, in a console write a test ASCII file with command:

echo "EasyTK1_IO" > test.txt

and check it with:

cat test.txt

now, open minicom :

minicom -D /dev/ttyTHS0 -b 57600

and send an ASCII file with CTRL-A -> S -> ASCII keyboard shortcut sequence.