27 June 2016, 18:48 | #1 |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
|
Trying to send serial data from Amiga to PC
Hello everyone
I have been experimenting and trying to get a successful serial connection from my Amiga 500 to my PC. I want to (for now) just be able to type in characters in the terminal program and the characters arrive in the terminal program on the other machine and vice versa. My setup is I have a null modem cable connecting the amiga to a gender changer which is then attached to a MAX3232 RS232 to TTL converter and then I connected the Rx and Tx lines to my USB serial bridge board. I set the baud rate to 9600 on both machines. I can receive characters on my PC but they are the wrong characters and I get a frame error warning in realterm. The character "n" will appear on my PC as a $ for example. It is consistent though. "n" will always be a $ and characters will always map to the same incorrect character. Also I try to send a character from my PC to the Amiga and nothing shows up at all. Any idea what the problem may be? I've tried 2 different terminal programs on the amiga and they both have exactly the same result. |
27 June 2016, 20:14 | #2 |
Amigan
Join Date: Feb 2012
Location: London
Posts: 1,317
|
Check the handshaking settings. If you only have Rx, Tx and ground then you can't do hardware handshaking (it uses 2 extra lines). Set the handshaking on both ends to Xon/Xoff (sometimes called software handshaking).
|
27 June 2016, 20:25 | #3 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,573
|
Wrong number of stop/start bits in PC side? (both must be 1) Wrong parity? Have you tried other bit rates? (I have noticed some USB adapters don't work with all Amiga bit rates, even if it is standard rate)
Keep handshake off until everything else works. Also handshake is not needed in Amiga to PC direction, even with high bit rates. |
27 June 2016, 20:25 | #4 |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
|
Thanks I just tried that. Unfortunately I get the exact same result. Realterm says Break condition received and UART receiver framing error
|
27 June 2016, 20:28 | #5 | |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
|
Quote:
I thought it was a problem with my MAX3232 adapter so I bought another one which arrived today with same result. I know my serial to USB bridge board works too because I use it all the time for my Arduino. Is there a problem changing the gender from null modem to MAX3232? Maybe some pins need redirection or something? I am so confused. I thought it would be more simple than this. I'm using Ncomm as my Amiga terminal if that helps. |
|
27 June 2016, 21:03 | #6 |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
|
Here is what "a" "b" and "c" arrive as on the PC as ascii and hex
a = "O" (4F 00) b = "'" (27 00) c = "N" (4E 00) Each character is followed by a null byte as you can see. I don't know if that's normal |
28 June 2016, 09:53 | #7 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
|
Slightly outside bet, but have you checked the Amiga's power supply? If the -12V isn't working correctly it can give strange serial problems, but the computer itself will work fine. Audio might be distorted too but not necessarily if there's still some sort of negative voltage on that line.
The MAX232 chip is quite tolerant of variable voltages and may be producing output in borderline cases that a standard RS232 UART simply wouldn't accept. Something to check out anyway. Edit: As for the null byte following a character, that's not normal but it could be a null-terminated string depending on how the software is doing the conversion and presenting it to you. Edit 2: Stop bits are the same at both ends, but all other settings are the same too, yes? Data bits 8? Some old software defaults to 7 data bits. Last edited by Daedalus; 28 June 2016 at 09:58. |
28 June 2016, 10:21 | #8 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,573
|
Frame error apparently is detected when stop bit is expected but it isn't stop bit (wrong signal level, perhaps signal changing mid stop bit?)
Either bit rates don't match or signal is corrupted or perhaps even inverted? (or there is a unknown hardware fault. EDIT: like previously mentioned -12v problem.) What do you get if you try to transmit character that has bit 7 set? |
28 June 2016, 13:36 | #9 | |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
|
Quote:
Yes the settings are the same on both ends for the data bits too. I have tried different baud rates too |
|
28 June 2016, 13:39 | #10 | |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
|
Quote:
I hooked up a wire from the null modem transmit to receive for a loopback and the amiga receives the same character that it sends... So that verifies it is correctly sending data right? |
|
28 June 2016, 15:13 | #11 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
|
It verifies that it's being sent correctly, yes. It might be worth trying the same from the PC end, and trying it with and without the TTL conversion step. You should still get the same characters echoed.
I would still have a look at the -12V line when the machine is connected to see if it's really -12V, and not sitting around -5V or something like that. Just another thought: You don't have some sort of funky Unicode charset translation going on on the PC side do you? That might explain the extra mystery byte... |
28 June 2016, 15:58 | #12 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,573
|
|
28 June 2016, 20:35 | #13 | |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
|
Quote:
No I'm not using unicode. Both ends are set to ASCII |
|
28 June 2016, 20:37 | #14 | |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
|
Quote:
Amiga | PC 8 bit | 8 bit 7 bit | 7 bit 7 bit | 8 bit 8 bit | 7 bit but all 4 of those have the exact same result! I am so confused! Thanks for your help guys. I really appreciate it. I wonder what the issue is. If I can get this issue fixed I have amazing Amiga projects to try out and then share with the Amiga community. |
|
28 June 2016, 22:37 | #15 |
Registered User
Join Date: Jan 2008
Location: United Kingdom
Age: 46
Posts: 735
|
Hi,
How are you powering the MAX3232 converter? |
28 June 2016, 22:39 | #16 |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
|
|
28 June 2016, 22:45 | #17 |
Registered User
Join Date: Jan 2008
Location: United Kingdom
Age: 46
Posts: 735
|
Err nope,
http://www.hardwarebook.info/Nullmodem_(9-9) You need to supply +5V or +3.3V from the USB-TTL adapter. Is your adapter like this? http://www.ebay.co.uk/itm/MAX3232-RS...MAAOSw9N1VuLEu or this? http://www.ebay.co.uk/itm/3X-Serial-...gAAOSwo0JWOb7- Both need an external power supply. With no +3.3V or 5V (voltage to suit the USB-TTL adapter), you're partially powering the adaptor from the V24(RS232) receivers. The MAX3232 is not fully powered and the outputs are not guaranteed. Ian |
29 June 2016, 00:06 | #18 | |
Registered User
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
|
Quote:
I hadn't hooked up anything to the VCC or GND on the MAX3232 because it seemed to work without it and the light went on whenever I sent a character and I assumed the VCC was for power going OUT of the MAX3232 to power another device. OK So I tried hooking up the 5V output on the usb serial bridge to the VCC on the MAX3232 and GND to GND. The light turns on on the MAX3232 and no data arrives on either end and after a few seconds the MAX3232 gets very hot so I unplug it. I tried it wish 3.3V instead and it doesnt get hot but still no data passes. I disconnect the power supply and once again data can pass as usual but incorrect again. |
|
29 June 2016, 10:54 | #19 | |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
|
Quote:
It sounds like something funky's going on with your adaptor though - the chip does indeed need power. If it was already powered it wouldn't heat up like that, so either the power supply is wrong or the chip wasn't powered correctly. I had problems with some of the older MAX232 chips latching their outputs on power up if the inputs were in a certain state, and quickly getting quite hot. Perhaps your adaptor is suffering a similar issue? It turned out my chips were knock-off parts I bought on eBay because I couldn't get them anywhere else at the time. Replacing them with official parts solved the problem... |
|
29 June 2016, 11:41 | #20 |
Registered User
Join Date: Jun 2013
Location: Australia
Posts: 685
|
If you ran the MAX233 trying to power itself from IO pins instead of its supply pins,
that's a classic way to break a chip, and the fact that it now gets hot when powered is what usually happens. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PC Serial to Amiga Serial | lesta_smsc | support.Hardware | 48 | 02 December 2015 10:14 |
Should I still try to send dumps over? | MethodGit | project.SPS (was CAPS) | 8 | 23 July 2013 02:51 |
If you could send an Amiga game character back in time... | Stab Master | Nostalgia & memories | 11 | 14 February 2010 00:29 |
The best way to send my amiga500 | C64 | MarketPlace | 4 | 17 January 2008 16:28 |
Send a Retro Amiga E-Card online. | cebulba | Nostalgia & memories | 0 | 05 August 2004 22:10 |
|
|