Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced - Add RS-232 comunications over USER_IO #67

Open
Maverick-Shark opened this issue Mar 28, 2021 · 19 comments
Open

Enhanced - Add RS-232 comunications over USER_IO #67

Maverick-Shark opened this issue Mar 28, 2021 · 19 comments

Comments

@Maverick-Shark
Copy link

Hi,
I have different old devices (i.e. TRS-80 Model 100 or HP 48GX) that I would like to connect to the MiSTer through RS-232 (COM1) to transfer files between them.
Could you enable over USER_IO a RS-232 communications (COM1)?

user_io

Thanks a lot,
Shark

@Maverick-Shark Maverick-Shark changed the title Enhanced - Add RS-232 comunicatiosn over USER_IO Enhanced - Add RS-232 comunications over USER_IO Mar 28, 2021
@sorgelig
Copy link
Member

I will add COM2 for USER_IO

@Maverick-Shark
Copy link
Author

Maverick-Shark commented Apr 4, 2021

Hi Sorgelig,

Not sure if it's working properly.
Using MsDOS 6.22 and MsKermit 3.01 as a communications software (that use kermit protocol), if I choose COM2 on AO486 MiSTer menu (Hardware -> USER I/0) and I run Ms Kermit, it seems that it doesn't detect COM2:

Kermit> set port com2
?This port will be operated through the Bios as BIOS2

And if I choose MIDI option the above message is not displayed.

Checking communications port with 'status' command (MsKermit), shows BIOS2. With 'set port com1', port is selected correctly (status command shows COM1).

Checking debug command (Ms DOS tool), it seems that the COM2 is configured (selecting MIDI or COM2 option):

C:> debug
-d 40:0

It detects two COM ports:

0040:0000

F8 03 F8 02 00 00 00 00-00 00 00 00 00 00 65 03 ..............e.
^^^^ ^^^^
COM1 COM2

But I don't know where is the issue.

Thanks and best regards,
Shark

@sorgelig
Copy link
Member

sorgelig commented Apr 4, 2021

I was using Dos Navigator to connect 2 MiSTers in terminal through COM2 and it worked.

@Maverick-Shark
Copy link
Author

Hi,
I don't have two MiSTers to try your scenario but I'll try Dos Navigator to connect to my device.
Thanks,
Shark

@Maverick-Shark
Copy link
Author

Hi again,
Sorry but I can't connect to my device.
My device is an HP 48G calculator that uses a proprietary interface with 4 pins and it uses only 3 pins, Rx, Tx and GND.
Using a db-9 serial cable connected as the following it works on my w10 computer with an usb adapter and an app that uses kermit protocol, configured at 9600 bauds on com port:
DB9 pin 2 - Rx
DB9 pin 3 - Tx
DB9 pin 5 - GND

image

My Mister has IOUSB addon from Antonio Villena that it has a DB9 male connector, and I'm using it as the following:
io_user port 0 -> DB9 pin3 Rx
io_user port 1 -> DB9 pin7 Tx
DB9 pin8 GND
NOTE: It doesn't use io_user port 3 as a GND.

image

Configuring on ao486 core USER IO as COM2 and UART MODE Connection as NONE, it doesn't works.

Please, could you help me? Is it correct to put UART MODE Connection as NONE? Have other options like PPP, Console MIDI and Modem sense in this case?

Thanks and best regards,
Shark

@sorgelig
Copy link
Member

Use official addon boards. Antonio Villena is known to produce incompatible boards. Sorry, it's not supported and won't be.

@Maverick-Shark
Copy link
Author

Hi,

But, please, tell me with which UART MODE I have to use? NONE?

When you tested it with Dos Navigator, do you use db9 serial cable or you connect io_user pins directly like the following?

Mister1-Pin0_Rx -> Mister2-Pin1_Tx
Mister1-Pin1_Tx -> Mister2-Pin0_Rx
Mister1-Pin2_RTS -> Mister2-Pin2_RTS
Mister1-Pin3_CTS -> Mister2-Pin3_CTS
Mister1-Pin4_DTR -> Mister2-Pin4_DTR
Mister1-Pin5_DSR-> Mister2-Pin5_DSR
Mister1-Pin6_DCD -> Mister2-Pin6_DCD

And how did you configure UART MODE?

Many thanks,
Shark

@sorgelig
Copy link
Member

I've used only Rx<->Tx connected directly from one MiSTer to another.
If you want to use other signals then they have to be connected according to RS232, so RTS->CTS, DTR->DSR and so on - i don't remember it exactly.
UART MODE doesn't matter - it affects only COM1 and MIDI. COM2 is connected directly to USER_IO. In Hardware page you need to set USER I/O : COM2

@Maverick-Shark
Copy link
Author

Maverick-Shark commented Apr 28, 2021

Hi,
Thanks for your reply.
I'm only using Tx<->Rx and GND, because I don't need more signals like RTS, CTS, and so on...
I've removed IO addon, and now I'm working directly over de10-nano board (without addons).
And I trying with this configuration:

USER I/O: COM 2 on ISD menu

Rx - user_io 0 - Arduino_IO15 ---> Tx - HP 48G
Tx - user_io 1 - Arduino_IO14 ---> Rx - HP 48G

image

Without success!! And I don't understand why.

Please, Could you know if those user_io pins allocation are correct? Do you know why it doesn't work?

Thanks and best regards,
Shark,

@sorgelig
Copy link
Member

BIG WARNING: don't use naked FPGA pins to connect random external devices!
FPGA uses 3.3V LVTTL levels and it can be fried being connected to 5V TTL device directly. Official IO Board has limiting resistors (100 Ohm) which at least should save from 5V TTV direct connection, but won't save from -/+9V-12V standard RS232 levels!
Another issue: USER_IO uses open-drain outputs, which means you need to use pull-up resistors to make it work. Official IO Board uses 10 KOhm pull-up resistors.

@Maverick-Shark
Copy link
Author

Maverick-Shark commented Apr 28, 2021

Hi,
In an Official IO Board, witch pins/connectors are used?

Thanks and best regards,
Shark

@sorgelig
Copy link
Member

@Maverick-Shark
Copy link
Author

Hi,

Is connector marked as J4 (Not USB! - User Port)?

Thanks,
Shark

@sorgelig
Copy link
Member

Yes

@Maverick-Shark
Copy link
Author

Hi,
Do you know if these voltages are correct to use with Mister (user_io ports)? (HP 48GX Serial Electrical spec.)

image

Thanks,
Shark

@Maverick-Shark
Copy link
Author

Maverick-Shark commented Apr 29, 2021

Hi,
Another test, selecting COM2 on USER I/O at OSD and running Win98SE. Windows 98 SE doesn't detect COM2 as a hardware port. Do you know why?
Thanks,
Shark

@Maverick-Shark
Copy link
Author

Hi,
And doing a loopback test over com2 with hyperterminal tool, it doesn't work too. I'm desperate!!!

Thanks,
Shark

@Maverick-Shark
Copy link
Author

Hi,
Now, hyperterminal loopback test works. Win98 with autodetect doesn't detect new hardware, I think because it isn't plug and play. Detecting com2 hardware "by hand" it found it. And loopback test it works!!

But now, issues with hp 48gx calculator go on!! Sniff!! Sniff!!
Do you know why?

Thanks,
Shark

@sorgelig
Copy link
Member

sorgelig commented Apr 30, 2021

ao486 is NOT plug and play core. It's ISA equipped core. Plug and Play started from PCI. PCI is not implemented. So you have to run "add new hardware" wizard and start "search" there. It's not only for COM2 - it's for ALL devices on ao486. So it's not an issue.

From table it looks like device is 5V TTV for output and accepts wide range of input. 3.5V is too high for MiSTer, but with 100 Ohm limiting resistor it should be ok.
Will it work or not - i have no idea. You need to experiment and use some measuring devices like osiloscope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants