English Amiga Board


Go Back   English Amiga Board > Support > support.Hardware

 
 
Thread Tools
Old 27 June 2016, 18:48   #1
Nightfox
Registered User
 
Nightfox's Avatar
 
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.
Nightfox is offline  
Old 27 June 2016, 20:14   #2
nogginthenog
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).
nogginthenog is offline  
Old 27 June 2016, 20:25   #3
Toni Wilen
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.
Toni Wilen is offline  
Old 27 June 2016, 20:25   #4
Nightfox
Registered User
 
Nightfox's Avatar
 
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
Quote:
Originally Posted by nogginthenog View Post
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).
Thanks I just tried that. Unfortunately I get the exact same result. Realterm says Break condition received and UART receiver framing error
Nightfox is offline  
Old 27 June 2016, 20:28   #5
Nightfox
Registered User
 
Nightfox's Avatar
 
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
Quote:
Originally Posted by Toni Wilen View Post
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.
Stop bits on both ends set to 1 bit. Parity is set to none on both ends :\

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.
Nightfox is offline  
Old 27 June 2016, 21:03   #6
Nightfox
Registered User
 
Nightfox's Avatar
 
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
Nightfox is offline  
Old 28 June 2016, 09:53   #7
Daedalus
Registered User
 
Daedalus's Avatar
 
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.
Daedalus is offline  
Old 28 June 2016, 10:21   #8
Toni Wilen
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?
Toni Wilen is offline  
Old 28 June 2016, 13:36   #9
Nightfox
Registered User
 
Nightfox's Avatar
 
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
Quote:
Originally Posted by Daedalus View Post
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.
I have no idea if it's my power supply. I'm using the power supply that came with the 500 and I never thought it had issues.

Yes the settings are the same on both ends for the data bits too. I have tried different baud rates too
Nightfox is offline  
Old 28 June 2016, 13:39   #10
Nightfox
Registered User
 
Nightfox's Avatar
 
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
Quote:
Originally Posted by Toni Wilen View Post
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?
If I set the amiga and PC to use 7 bits instead of 8 I still get the exact same issue.

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?
Nightfox is offline  
Old 28 June 2016, 15:13   #11
Daedalus
Registered User
 
Daedalus's Avatar
 
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...
Daedalus is offline  
Old 28 June 2016, 15:58   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,573
Quote:
Originally Posted by sacredbanana View Post
If I set the amiga and PC to use 7 bits instead of 8 I still get the exact same issue.
I meant using 8-bit mode and sending 8-bit character that has bit 7 set. Your all test cases above had bit 7 cleared.
Toni Wilen is offline  
Old 28 June 2016, 20:35   #13
Nightfox
Registered User
 
Nightfox's Avatar
 
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
Quote:
Originally Posted by Daedalus View Post
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...
How do I check the power supply? I have the standard power supply that came with this Amiga 500 and I thought it was working perfectly.

No I'm not using unicode. Both ends are set to ASCII
Nightfox is offline  
Old 28 June 2016, 20:37   #14
Nightfox
Registered User
 
Nightfox's Avatar
 
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
Quote:
Originally Posted by Toni Wilen View Post
I meant using 8-bit mode and sending 8-bit character that has bit 7 set. Your all test cases above had bit 7 cleared.
I have tried:

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.
Nightfox is offline  
Old 28 June 2016, 22:37   #15
Stedy
Registered User
 
Stedy's Avatar
 
Join Date: Jan 2008
Location: United Kingdom
Age: 46
Posts: 735
Hi,

How are you powering the MAX3232 converter?
Stedy is offline  
Old 28 June 2016, 22:39   #16
Nightfox
Registered User
 
Nightfox's Avatar
 
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
Quote:
Originally Posted by Stedy View Post
Hi,

How are you powering the MAX3232 converter?
I assume it gets power from the null modem cable from the amiga?
Nightfox is offline  
Old 28 June 2016, 22:45   #17
Stedy
Registered User
 
Stedy's Avatar
 
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
Stedy is offline  
Old 29 June 2016, 00:06   #18
Nightfox
Registered User
 
Nightfox's Avatar
 
Join Date: Apr 2016
Location: Perth, Australia
Posts: 401
Quote:
Originally Posted by Stedy View Post
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
Mine is this one http://www.ebay.co.uk/itm/191556888700

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.
Nightfox is offline  
Old 29 June 2016, 10:54   #19
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
Quote:
Originally Posted by sacredbanana View Post
How do I check the power supply? I have the standard power supply that came with this Amiga 500 and I thought it was working perfectly.
You'll need to measure the voltage of the middle pin of the square power connector, ideally when the computer is turned on. This would need to be done with the lid off obviously, but you should be able to get at it.

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...
Daedalus is offline  
Old 29 June 2016, 11:41   #20
xArtx
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.
xArtx is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:09.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.11244 seconds with 13 queries