FTDI needed for TX and RX in 40GPIO to enable UART1?

WK Loh
WK Loh New Member Posts: 7
I would like to know if I need a FTDI to enable UART1 on the pin 8 and 10? pls help. I'm a newbie here and with mechanical background. your kind guidance is deeply appreciated.

Comments

  • Kurt
    Kurt New Member Posts: 146 ✭✭
    I have not tried the GPIO pins yet on the Up board as I am waiting for Ubuntu 16.04 support.

    But I believe the answer is, it depends on what you are using it for. The IO pins on the UP connector are I believe 3.3v TTL level outputs.

    So if you are trying to communicate with another board who has a USART that also communicates at 3.3v TTL, then you can directly connect the boards. Note you will also need a common ground wire.

    If however your board communicates at 5v, then you will probably require some form of TTL level shifter. You can get these from several different places including Adafruit and Sparkfun...

    However if you wish to connect this up to a systems serial port that is communicating using RS232 level signals, maybe with an old style RS232 like connector, then you may need some setup that uses something like a MAX3232 chip to convert the levels.

    However if you wish to be able to connect the TTL level UART signals to a PC through USB, then yes you
    then yes you may need something like an FTDI setup. This can be using something like an adapter board or cable like: https://www.sparkfun.com/products/9717 . But warning make sure to check that the Cable or board you are using is setup to communicate with 3.3v signals and not 5v signals.
  • WK Loh
    WK Loh New Member Posts: 7
    Yes I'm using 3.3v TTL and directly connect to it. however, I cannot detect the UART when I do this > dmesg | grep tty . I cannot see the tty address to the hardware. I have successfully used the FTDI and it works but not the GPIO.
  • Kurt
    Kurt New Member Posts: 146 ✭✭
    Sorry, not sure what you are saying here.

    However today I tested running some code that used these pins to talk to a Teensy 3.2, where I connected pins 6, 8, 10 of this connector up to GND and in my case Serial2 on the Teensy.

    My code on the UP did this through using /dev/ttyS1 on the UP, which is configured to use these pins. Internally my code uses termios to configure the Uart, in the case of my code to use a Baud rate of 2mbs.

    Note on my machine I see:
    kurt@kurt-UP-CHT01:~$ dmesg | grep -i tty
    [    0.000000] console [tty0] enabled
    [    1.813696] 00:01: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
    [    4.641559] 8086228A:00: ttyS1 at MMIO 0xa171b000 (irq = 39, base_baud = 2764800) is a 16                 550A
    kurt@kurt-UP-CHT01:~$
    
    Not sure what the base_baud=2764800 means? Is that the Max baud? The Wiki says the baud rate max is 3686400
  • WK Loh
    WK Loh New Member Posts: 7
    I connect the tx and rx on pin 8 and 10 with corresponding power and ground. but still cannot detect the ttyS1. not sure why. anything that i need to change in bios?
  • Kurt
    Kurt New Member Posts: 146 ✭✭
    Actually maybe someone from UP can better answer this.

    But my guess is it would help to have more information. Like: What OS are you running on your UP?

    I believe the answer is different depending on which OS you are using:

    Windows: not likely as as you are talking about /dev/ttyS1

    Ublinux: Not sure if you need to install some additional packages or not,

    Ubuntu: Have you installed the Linux Kernel update as talked about in the thread: https://up-community.org/forum/announcements/866-up-board-4-4-linux-kernel-for-ubuntu-16-04-and-14-04-is-now-available
    Which points you to the instructions on how to install it in: https://up-community.org/wiki/Ubuntu

    I personally have mine setup currently with 16.04 and can now use the USART and IO pins. Note for the GPIO pins you need to run as the ROOT... To verify:

    At a command prompt you should try typing: uname -r
    And it should show some name like: 4.4.0-1-upboard
    If yours does not end with -upboard, then you are probably not running a version of the kernel with support the the extra features of the UP board.

    Hope that help.
  • WK Loh
    WK Loh New Member Posts: 7
    Thanks KurtE. The OS I'm using is Ubuntu 14.04. uname -r gives me 4.2.0-3-upboard. I think I had some setup problem even I tried to update the kernel to 4.4. guess this is the learning curve for new Linux user and with mechanical background. Is there a clear steps to install Ubuntu 16.04 and getting the GPIO work in chronological way to get newbie started with Upboard? I think this kind of instruction for dummy should be the priority for attracting new adoption and creating mind share and blooming the upboard ecosystem.
  • Kurt
    Kurt New Member Posts: 146 ✭✭
    As I mentioned, Some of these questions are best answered by UP or Emutex.

    This is my first up board as well. I am no expert with Linux, but have played with a few different boards, like RPI, BeagleBone Black, Edison, Odroid (C1, C2, Xu4) and now UP. The first board was the RPI. During this time I kept some random notes, which I keep in my "Raspberry Pi" project ( https://github.com/KurtE/Raspberry_Pi ) in it's readme, which I still refer to from time to time to remember how to do some things...

    Not knowing what error you ran into, it is hard to know what all might have gone wrong. Maybe again some one can help.

    One of the first things I do when I start up my board, is to try to make sure everything is up to date, which a chain of commands like:
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get dist-upgrade
    sudo apt-get autoremove
    

    I believe that the stuff should work on 14.04. Again I have not tried it on 14.04 as I wanted to go to the current LTE release, such that I could also try out the current version of ROS.

    If you do a: ls /dev/ttyS*
    does anything show up?

    What shows up if you type: ls /sys/class/gpio

    As for instructions on how to install. I decided to make mine dual boot, with Windows 10. So I followed the instructions in the video, that you can find a link to in the wi: https://up-community.org/wiki/Microsoft_Windows, then downloaded and install Ubuntu and told it to live along side of windows. After this completed I used it until now when they released the kernel that has support for the GPIO pins. Again instructions for this is no up at:
    https://up-community.org/wiki/Ubuntu

    Note: I mostly run my UP board headless (no monitor, keyboard or mouse), but I connect to it through programs like PuTTY (currently I am using KiTTy) on Windows 10 and I use winSCP to move files back and forth.

    Again hard to say much more without knowing what issues you are running in to.

    Kurt