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?
RS232... here goes!
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: RS232... here goes!
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).
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?
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?
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: RS232... here goes!
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.
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.
- GARTHWILSON
- Forum Moderator
- Posts: 8775
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: RS232... here goes!
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\.
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: RS232... here goes!
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.
- GARTHWILSON
- Forum Moderator
- Posts: 8775
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: RS232... here goes!
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- GARTHWILSON
- Forum Moderator
- Posts: 8775
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: RS232... here goes!
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: RS232... here goes!
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.
x86? We ain't got no x86. We don't NEED no stinking x86!
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: RS232... here goes!
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
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
https://github.com/floobydust
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: RS232... here goes!
floobydust wrote:
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 
x86? We ain't got no x86. We don't NEED no stinking x86!
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: RS232... here goes!
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
https://github.com/floobydust
Re: RS232... here goes!
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
.
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
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: RS232... here goes!
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.
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
https://github.com/floobydust
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: RS232... here goes!
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.
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
https://github.com/floobydust
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: RS232... here goes!
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.
x86? We ain't got no x86. We don't NEED no stinking x86!
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: RS232... here goes!
banedon wrote:
Oh, btw can you use non-polarised cermaic 1uF caps instead of the electrolytics?
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).
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!