Page 2 of 2

Re: 8251A introduction

Posted: Fri Mar 31, 2023 11:38 am
by superbenk
I assume I'm still running into some baudrate mis-match that the VT510 can't handle. I tried rigging up a Pico to translate the baudrates but I wasn't successful.

Nabu (TX) -> (RX) RS232-TTL adapter (TX) -> (RX) Pico UART1 @ 111875 -> [ CircuitPython ] -> Pico UART2 @ 115200 (TX) -> (RX) TTL-RS232 adapter 9-pin -> VT510

Code: Select all

# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
# SPDX-License-Identifier: MIT
import board
import busio

uart1 = busio.UART(tx=board.A2, rx=board.A3, baudrate=111875)
uart2 = busio.UART(tx=board.D24, rx=board.D25, baudrate=115200)

while True:
    nabu = uart1.read(1)
    vt510 = uart2.read(1)
    if vt510: 
        print("From VT510: {}".format(vt510))
    elif nabu:
        print("From NABU: {}".format(nabu))
        uart2.write(str(nabu).encode("ISO-8859-1"))
Produces this on the serial console:

Code: Select all

main.py output:
From VT510: b'\x00'
From NABU: b'\x12'
From NABU: b'\x00'
From NABU: b'\x12'
From NABU: b'\x00'
From NABU: b'\x12'
From NABU: b'\x00'
From NABU: b'\x12'
From NABU: b'\x00'
From VT510: b'\r'
From VT510: b'y'
From VT510: b'g'

Re: 8251A introduction

Posted: Fri Mar 31, 2023 1:44 pm
by DJ Sures
Could also be a missing gnd. Check for continuity between the terminal and nabu gnds to make sure it’s all good

Re: 8251A introduction

Posted: Fri Mar 31, 2023 11:36 pm
by greghol
superbenk wrote: Fri Mar 31, 2023 11:38 am I assume I'm still running into some baudrate mis-match that the VT510 can't handle. I tried rigging up a Pico to translate the baudrates but I wasn't successful.

Nabu (TX) -> (RX) RS232-TTL adapter (TX) -> (RX) Pico UART1 @ 111875 -> [ CircuitPython ] -> Pico UART2 @ 115200 (TX) -> (RX) TTL-RS232 adapter 9-pin -> VT510
Ben, Are you powering the converters with 3.3V? I think Picos are 3.3V only and not 5V tolerant. Make sure the RS232 converts run at 3.3V and that ground is connected for power and across the rx and tx connections from NABU and Term.

Have you tried to generate serial to the term from Pico? Or use a loop back from tx to rx on the terminal connector. This may eliminate some variables.

Greg

Re: 8251A introduction

Posted: Tue Apr 04, 2023 1:14 am
by superbenk
Yes, powering the converters with 3.3v. I can read/write from/to the VT-510 with the Pico so that's fine. I can only get garbage from the Nabu though (looks like a mix of hex & mixed up ASCII). The ASCII that comes through *USUALLY* doesn't line up with the key being pressed (sometimes it does).

Now I'm wondering if I need an RS422 to RS232 converter?

It's still weird to me how it worked fine going through an RS232 to USB converter into Minicom though.

Yes, I'm connecting ground from the Nabu through to the VT-510 including all converters.

In retrospect I should have made this a new topic from the beginning rather than tack the whole conversation about using a VT-510 onto the announcement topic. Sorry about that.

Re: 8251A introduction

Posted: Wed May 24, 2023 1:26 am
by TorontoNabu
Great hack. Going to give this a try.

I was also thinking of enhancing this by connecting the TX through the unused transceiver on U13 and then to the unused pins on the keyboard connector. This will give a bi directional 8251 "keyboard" via rs422 that I can connect to a PC. It can be used for terminal i/o without disturbing the IA, or just as regular nabu keyboard input. My Nabu is in the basement and I am often remotely logged into the linux box connected to it with a video capture and now 2 USB to RS422 adaptors.

Just an idea, need to check the PCB to see if this can work.

Cheers