6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 8:33 pm

All times are UTC




Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: RS232... here goes!
PostPosted: Fri Apr 17, 2015 8:50 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8506
Location: Midwestern USA
banedon wrote:
Thanks flooby & Peter. I don't currently have any Rockwell ones, but I'll have a look around to find what's out there (including the SC26C92).

The 26C92 is much easier to interface to the 65xx bus than the 16550, and also provides much higher performance.

Quote:
In the meantime, here's how I think the WDC W65C51N should be connected up.
One thing which I'm not sure on is whether to tie RXC to VDD or VSS as it's a bidirectional port. Or just leave it?
Attachment:
w65c51n_rs232c.png

CTS, RTS, DTR and DSR are TTL-level signals on the 6551. You can't directly connect them to an RS-232 device as you appear to be doing in your circuit.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: RS232... here goes!
PostPosted: Fri Apr 17, 2015 9:03 pm 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
Ahh ok. I wondered if this might be the case as I was unsure what levels those signals are supposed to be. Do people often use them? Going by Garth's tutorial he seems to be suggesting that all that needs connecting is TxD, RxD and GND, but I thought why not put the handshake stuff in if they're there.
How would you normally connect them? Through a voltage level converter, perhaps?
If they are of no real use & are a pain to implement I'll tie them high to VDD.
Attachment:
w65c51n_rs232c_rev1.png
w65c51n_rs232c_rev1.png [ 23.36 KiB | Viewed 601 times ]


Top
 Profile  
Reply with quote  
 Post subject: Re: RS232... here goes!
PostPosted: Fri Apr 17, 2015 9:22 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
I leave RxC not connected if I'm not using it.

The only times I have not used the hardware handshake lines were when I used the '51 for MIDI and for tape modems. Otherwise I have always used hardware handshaking. And yes, they have have to go through the same kind of inverting line drivers and receivers used for RxD and TxD, to go to and from the ±12V, unless you're interfacing to something that's specifically TTL level instead of RS-232 levels. If you don't use them, you need to tie the CTS\ input low so the transmitter will operate, and the DCD\ input low for the receiver to operate. The handshake lines used most are RTS\ and CTS\, followed (rather distantly) by DSR\ and DTR\.

_________________
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: RS232... here goes!
PostPosted: Fri Apr 17, 2015 10:25 pm 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
So I need to put in two Dual channel MAX232's? I.e. The first one to do RxD, TxD, /RTS and /CTS and the other to do /DSR and /DTR.


Top
 Profile  
Reply with quote  
 Post subject: Re: RS232... here goes!
PostPosted: Fri Apr 17, 2015 10:52 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
I see you're not using T2IN, T2OUT, R2IN, and R2OUT. Use those for CTS & RTS. I like to use the MC145406 16-pin IC which has three transmitters and three receivers, with no external components. It needs ±10V (give or take a few volts), but I usually have those for other things anyway. Then I can have DSR & DTR also, in addition to CTS & RTS. BTW, I see you have RTS\ and DTR\ connected to +5V. Those are outputs, so leave them not connected if you don't use them.

_________________
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: RS232... here goes!
PostPosted: Fri Apr 17, 2015 10:54 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
Woops, I thought you meant for RTS & CTS. After re-reading, I see you did mean DSR & DTR. The latter are not as important; but if you want them, then a single MAX232 won't be enough.

_________________
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: RS232... here goes!
PostPosted: Sat Apr 18, 2015 2:24 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8506
Location: Midwestern USA
banedon wrote:
So I need to put in two Dual channel MAX232's? I.e. The first one to do RxD, TxD, /RTS and /CTS and the other to do /DSR and /DTR.

Take a look at the MAX238.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: RS232... here goes!
PostPosted: Sat Apr 18, 2015 3:03 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
Here's the schematic for my 6551 async setup which I use as a console:

Attachment:
6551-async.png
6551-async.png [ 52.36 KiB | Viewed 588 times ]


I use this with a basic null modem cable via a FTDI USB-serial interface and it's been working fine. Two chips... interfaces directly to any 6502 system ;-)

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: RS232... here goes!
PostPosted: Sat Apr 18, 2015 4:14 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8506
Location: Midwestern USA
floobydust wrote:
Here's the schematic for my 6551 async setup which I use as a console:
Attachment:
6551-async.png

I use this with a basic null modem cable via a FTDI USB-serial interface and it's been working fine. Two chips... interfaces directly to any 6502 system ;-)

What is the purpose of the JP3 header and the parts connected to it?

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


Top
 Profile  
Reply with quote  
 Post subject: Re: RS232... here goes!
PostPosted: Sat Apr 18, 2015 4:40 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
JP3 just allows me to place the 6551 interrupt to either the CPU IRQ or NMI (did the same for the 65C22 on the same PCB). The diode is not needed... I was thinking that WDC might have made the IRQ output drive on later chips similar to the newer style W65C22. If I were to redo the board again, I wouldn't bother with JP3.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: RS232... here goes!
PostPosted: Sat Apr 18, 2015 10:29 am 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
Thanks floobydust. I noticed that the polarity of C10 is with the anode towards the Max238. Is this correct? The only reason I ask is that the pin on the IC is negative voltage and I've seen a circuit digram with the anode towards GND.
Oh, btw can you use non-polarised cermaic 1uF caps instead of the electrolytics?

[edit] Now that I've finally had some sleep and another look at the datasheet for the 238, my brain has just gone"Ohhh. I get it".
There was me thinking that there was someting magical about the Max232/238, but from what I see all it does is have X number of CMOS/TTl lines in coupled with the same number of RS232 out (and another set but reversed RS232 to CMOS/TTL).
In between it converts from TTL/CMOS voltage levels to the RS232 ones and inverts them for the logic (and vice versa on the RS232 to TTL/CMOS).
C1+/- helps double up the +5V to +10V, C2+/- then converts the +10 to -10V so we have our two RS232 logic levels.
+V is an unregulated ouput from C1+/- and -V is the same for C2/-. Not quite sure what you'd use them for though as their voltage would dip as soon as you start loading them.
Feel a bit stupid :oops:. Obviously the 65C816 in my brain has been running at 3.3V :wink: :mrgreen:.


Top
 Profile  
Reply with quote  
 Post subject: Re: RS232... here goes!
PostPosted: Sat Apr 18, 2015 2:05 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
Ha, good find, yes the one cap is shown with reversed polarity, I missed it. I don't use polarized electrolytic caps on my board, but non-polar ceramics which are much smaller and shouldn't be problematic over time. Also note that I didn't use a 1meg resistor in parallel with the Xtal. The only chips I have that require it are the WDC ones, which are also the ones with the Xmit bug. It doesn't hurt it there however but a half-size can oscillator is preferred.

My later setup uses a FTDI USB/Serial converter which replaces the Max238 chip and associated parts. I also wire up the interface lines for a built-in null modem between the 6551 and the FTDI unit. This allows me to directly connect the system to a typical USB port. By installing the FTDI virtual Com port driver I can use ExtraPutty as a terminal console and even do data transfers using Xmodem.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: RS232... here goes!
PostPosted: Sat Apr 18, 2015 2:10 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
Here's a link to the FTDI unit I'm using:
http://www.mouser.com/ProductDetail/FTD ... yVDNan4%3d

You can use some of the other USB/Serial modules and grab 5V to run the board as well, but I opted to keep power separate.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: RS232... here goes!
PostPosted: Sat Apr 18, 2015 6:54 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8506
Location: Midwestern USA
floobydust wrote:
JP3 just allows me to place the 6551 interrupt to either the CPU IRQ or NMI (did the same for the 65C22 on the same PCB). The diode is not needed... I was thinking that WDC might have made the IRQ output drive on later chips similar to the newer style W65C22. If I were to redo the board again, I wouldn't bother with JP3.

I was wondering about the diode, which would not have worked as expected.

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


Top
 Profile  
Reply with quote  
 Post subject: Re: RS232... here goes!
PostPosted: Sat Apr 18, 2015 7:03 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8506
Location: Midwestern USA
banedon wrote:
Oh, btw can you use non-polarised cermaic 1uF caps instead of the electrolytics?

I use tantalums in that application. Very small for the capacitance, making it easy to get them in tight to the chip. Also, they have low leakage. My experience has been that the ultimate voltage produced will be lower with electrolytics due to the higher leakage.

Quote:
There was me thinking that there was someting magical about the Max232/238, but from what I see all it does is have X number of CMOS/TTl lines in coupled with the same number of RS232 out (and another set but reversed RS232 to CMOS/TTL).

All the MAX238 is is two MAX232s in one package with a common charge pump circuit. There is also the MAX248, which is essentially four MAX232s in one package.

Incidentally, in my POC units I attached the DTR pin of the TIA-232 socket to pin 11 of the MAX238, which means DTR will be true as soon as the power is applied. Few systems use DTR, but it's there just in case.

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


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 29 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: