Page 2 of 4
Re: RS232... here goes!
Posted: Fri Apr 17, 2015 8:50 pm
by BigDumbDinosaur
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.
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?
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.
Re: RS232... here goes!
Posted: Fri Apr 17, 2015 9:03 pm
by banedon
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.
Re: RS232... here goes!
Posted: Fri Apr 17, 2015 9:22 pm
by GARTHWILSON
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\.
Re: RS232... here goes!
Posted: Fri Apr 17, 2015 10:25 pm
by banedon
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.
Re: RS232... here goes!
Posted: Fri Apr 17, 2015 10:52 pm
by GARTHWILSON
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.
Re: RS232... here goes!
Posted: Fri Apr 17, 2015 10:54 pm
by GARTHWILSON
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.
Re: RS232... here goes!
Posted: Sat Apr 18, 2015 2:24 am
by BigDumbDinosaur
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.
Re: RS232... here goes!
Posted: Sat Apr 18, 2015 3:03 am
by floobydust
Here's the schematic for my 6551 async setup which I use as a console:
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

Re: RS232... here goes!
Posted: Sat Apr 18, 2015 4:14 am
by BigDumbDinosaur
Here's the schematic for my 6551 async setup which I use as a console:
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?
Re: RS232... here goes!
Posted: Sat Apr 18, 2015 4:40 am
by floobydust
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.
Re: RS232... here goes!
Posted: Sat Apr 18, 2015 10:29 am
by banedon
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

. Obviously the 65C816 in my brain has been running at 3.3V

.
Re: RS232... here goes!
Posted: Sat Apr 18, 2015 2:05 pm
by floobydust
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.
Re: RS232... here goes!
Posted: Sat Apr 18, 2015 2:10 pm
by floobydust
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.
Re: RS232... here goes!
Posted: Sat Apr 18, 2015 6:54 pm
by BigDumbDinosaur
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.
Re: RS232... here goes!
Posted: Sat Apr 18, 2015 7:03 pm
by BigDumbDinosaur
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.
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.