6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 17, 2024 8:44 am

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Odd Max232 behaviour
PostPosted: Mon Dec 16, 2013 8:40 am 
Offline

Joined: Mon Apr 16, 2007 6:04 am
Posts: 155
Location: Auckland, New Zealand
OK, this one has me stumped. I have transferred my Orwell machine off breadboard onto (slightly) less dodgy Veroboard.

Image

This was mainly an exercise to check my schematic is correct before having a PCB made. Everything is working well except my serial receiving.

I am using a MAX232CPE with 1uF capacitors. Every is wired up correctly. I see the correct +/- 10 volts on the right pins. Transmitting works fine. Receiving however is a little flaky. What seems to be happening is the receiver is only outputting when the supply voltage is less than 4.5 volts or so (the exact lever seems variable). If the voltage goes above that (it should be 5 normally) the output pin stops working. I am using R2IN (pin 8 ) for the receiver input so should see a TTL 5 volt signal on pin 9. The serial port (a real one) is outputting the proper RS232 level signals.

I can sit there and turn the voltage down from 5 volts to 4 and make the signal come and go. I have tried a different 232 chip (and ICL232CPE) as well as isolating pin 9 totally (by bending the leg up) and it is still the same. I also tried removing the 6551 from the circuit and it still works the same odd way.

At 4 volts it all actually works fine. Any ideas what could be causing this? The only thing I can see that's odd is that as I change the supply voltage the zero level of the input pin goes up and down. If that offset above ground goes over 1 volt it seems to stop the output working. The ground is attached and all the caps are correctly polarised.

Simon

_________________
My 6502 related blog: http://www.asciimation.co.nz/bb/category/6502-computer


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd Max232 behaviour
PostPosted: Mon Dec 16, 2013 1:13 pm 
Offline
User avatar

Joined: Mon Apr 23, 2012 12:28 am
Posts: 760
Location: Huntsville, AL
Simon:

Can't say that I have run across this situation before. However, if you've checked the IC ground and power connections and they are correct, then I suspect the capacitors. It looks like you are using aluminum electrolytic capacitors. I think that either the working voltage for these caps is too low, or their leakage current is exceeding the capability of the IC.

If you don't have large enough ceramic capacitors, I would change to using 1 microfarad tantalum electrolytic capacitors. My preferred solution would be to change to a transceiver that operates with 0.1 microfarad ceramic capacitors, and any compatible transceiver made by any manufacturer other than Maxim. (Generally speaking, the capacitance required when using low ESR ceramic components is significantly less than that required when using Al electrolytic capacitors. The result is lower switch/converter losses and lower ripple.)

No MAX. The channel resistances of the voltage converters in the MAX parts are way too high, especially in the MAX232 series. Drop-in compatible parts from other vendors, such as Analog Devices, may be more expensive, but these resistances are much lower. This allows these components to operate with significantly improved ripple, and much lower EMI levels.

_________________
Michael A.


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd Max232 behaviour
PostPosted: Mon Dec 16, 2013 3:07 pm 
Offline

Joined: Sat Jul 28, 2012 11:41 am
Posts: 442
Location: Wiesbaden, Germany
Sure looks like a ground problem. Make sure, that neither power supply ground nor RS232 signal ground have any significant resistance to pin 15 of the MAX232. Measure from both sides, the power supply and the RS232 signal source including cable.

_________________
6502 sources on GitHub: https://github.com/Klaus2m5


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd Max232 behaviour
PostPosted: Mon Dec 16, 2013 5:26 pm 
Offline

Joined: Mon Apr 16, 2007 6:04 am
Posts: 155
Location: Auckland, New Zealand
I am about to rush off to work so can't do much just now unfortunately except mention that this morning, when it is much cooler, it is working fine at 5 volts. I'll check again later. I am using electrolytic 1uF caps. I'll have a play measuring the ground resistances later on tonight.

Thanks!

Simon

_________________
My 6502 related blog: http://www.asciimation.co.nz/bb/category/6502-computer


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd Max232 behaviour
PostPosted: Mon Dec 16, 2013 5:41 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8542
Location: Southern California
I really don't think it has anything to do with the capacitors since the transmitting part is working fine but the problem is in the receiving.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd Max232 behaviour
PostPosted: Mon Dec 16, 2013 8:10 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8494
Location: Midwestern USA
I suspect a ground problem, since the transmitter side appears to be functioning normally.

That said, aluminum electrolytics shouldn't be used for the charge pump capacitors. I have long used 1µf tantalums for that purpose. Also, be sure to have a 1µf cap (tantalum or ceramic) as close as possible to pins 15 and 16 per the Maxim data sheet. Additionally, a 100µf low ESR electrolytic in parallel with that pin 15-16 bypass cap is recommended.

BTW, you did check that all charge pump caps are correctly connected, eh? I've never had a problem with the MAX series and have used them for some 25 years in various projects.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd Max232 behaviour
PostPosted: Tue Dec 17, 2013 4:04 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Simon wrote:
The only thing I can see that's odd is that as I change the supply voltage the zero level of the input pin goes up and down.
Sorry, I don't follow. Which pin?

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd Max232 behaviour
PostPosted: Tue Dec 17, 2013 5:50 am 
Offline

Joined: Mon Apr 16, 2007 6:04 am
Posts: 155
Location: Auckland, New Zealand
Dr Jefyll wrote:
Simon wrote:
The only thing I can see that's odd is that as I change the supply voltage the zero level of the input pin goes up and down.
Sorry, I don't follow. Which pin?

Sorry, pin 8 which I have the receive line coming in on. I have some 1uF tantalums to try now but wouldn't you know it this evening it's working perfectly as is! I'll change the caps anyway.

_________________
My 6502 related blog: http://www.asciimation.co.nz/bb/category/6502-computer


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd Max232 behaviour
PostPosted: Tue Dec 17, 2013 6:04 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Hmmm.. so, up & down, you say. Approximately what voltages? (By "the zero level" I hope you don't mean zero volts.) And does it still change according to the supply even though things are working now?

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd Max232 behaviour
PostPosted: Tue Dec 17, 2013 6:48 am 
Offline

Joined: Mon Apr 16, 2007 6:04 am
Posts: 155
Location: Auckland, New Zealand
With the new caps what I see on pin 8 is this:

At 4.5 volt supply I see it swinging from 0 to about 7.10 volts.
At 5.0 volts the whole waveform lifts up so it is swinging from 0.4 volts to 4.7 volts.

Last night when I was looking that offset was much higher at about 1.3 volts above zero when at 5 volts supply. I am guessing that's close to the receiver low threshold which is why when it goes above that the output just became fixed?

_________________
My 6502 related blog: http://www.asciimation.co.nz/bb/category/6502-computer


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd Max232 behaviour
PostPosted: Tue Dec 17, 2013 8:48 am 
Offline

Joined: Mon Apr 16, 2007 6:04 am
Posts: 155
Location: Auckland, New Zealand
Been running for quite a few hours now, no signs of any glitches.

_________________
My 6502 related blog: http://www.asciimation.co.nz/bb/category/6502-computer


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd Max232 behaviour
PostPosted: Tue Dec 17, 2013 9:08 am 
Offline

Joined: Sat Jul 28, 2012 11:41 am
Posts: 442
Location: Wiesbaden, Germany
from datasheet: R2IN low threshold 1.2V typical, 0.8V minimum.
So if you stay above that range you will see the output stuck low. Remember that RS232 specifies the minimum low voltage to be -3V (max -15V, high +3V - +15V) and the driver must be capable of driving a 3kOhms load. So the input hysteresis must be at least -3V to +3V to guarantee noise resilience.

What are you connecting to? Is it one of those RS232 to USB-Adapters. They are known to violate the RS232 standards. If you are connecting to a genuine RS232 port (anything on a PC motherboard or a PCI expansion card) it is probably broken. They are capable of driving close to +-12V.

Another problem could be the -12V V from the PC power supply beeing dead. The PC doesn't need that voltage for anything else, so the PC works perfectly well unless you connect something to an RS232 port.

_________________
6502 sources on GitHub: https://github.com/Klaus2m5


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd Max232 behaviour
PostPosted: Tue Dec 17, 2013 9:25 am 
Offline

Joined: Mon Apr 16, 2007 6:04 am
Posts: 155
Location: Auckland, New Zealand
I am connecting to the serial port on the mother board. I know about the USB adapters not being so good (I have one of those also and it's terrible!). The power supply should be good, it's a very good quality one but I will measure it sometime. I don't think PC serial ports have been very good for some time now to be honest. Everything has gone USB and any serial port seems a token gesture. I think a lot of them on modern motherboard aren't using proper RS232 levels now?

One silly question, when measuring the RS232 side signals, should the scope be on AC or DC coupling?

_________________
My 6502 related blog: http://www.asciimation.co.nz/bb/category/6502-computer


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd Max232 behaviour
PostPosted: Tue Dec 17, 2013 10:59 am 
Offline
User avatar

Joined: Mon Dec 08, 2008 6:32 pm
Posts: 143
Location: Brighton, England
Simon wrote:
One silly question, when measuring the RS232 side signals, should the scope be on AC or DC coupling?

DC coupling. With AC coupling, although the displayed waveform will look the same, you will not be able to measure voltage levels with reference to ground, only with reference to other parts of the displayed waveform.

_________________
Shift to the left,
Shift to the right,
Mask in, Mask Out,
BYTE! BYTE! BYTE!


Top
 Profile  
Reply with quote  
 Post subject: Re: Odd Max232 behaviour
PostPosted: Tue Dec 17, 2013 5:32 pm 
Offline

Joined: Mon Apr 16, 2007 6:04 am
Posts: 155
Location: Auckland, New Zealand
When I measure it today I see seeing a swing of 8 volts or so on the input. And the lower part is negative by about 1.6 volts. And I am getting the proper TTL signals out. I haven't seen it fail since I replaced the capacitors but it needs more testing and observation.

_________________
My 6502 related blog: http://www.asciimation.co.nz/bb/category/6502-computer


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron