RS232 line drivers

Building your first 6502-based project? We'll help you get started here.
Dan Moos
Posts: 277
Joined: 11 Mar 2017
Location: Lynden, WA

RS232 line drivers

Post by Dan Moos »

I don't need line drivers to connect my 6551 to a FTDI or similar USB to serial interface, right?
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: RS232 line drivers

Post by GARTHWILSON »

Check the voltages and polarities of the model of interface adapter you want to use. (I say "and polarities" because the line drivers and receivers invert the polarity, not just translate the voltage.) The line drivers and receivers may or may not be needed. (If you don't have them, it's not true RS-232, but they are being left out sometimes to reduce the parts count, at the expense of being compatible with those things that truly are RS-232.) I have an FTDI USB-to-RS232 adapter that does have the line drivers and receivers and does the higher ± voltages.
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?
Dan Moos
Posts: 277
Joined: 11 Mar 2017
Location: Lynden, WA

Re: RS232 line drivers

Post by Dan Moos »

I have this:

http://www.mouser.com/Search/ProductDet ... RS232-PCBA

I'm thinking it probably expects true RS232 levels. Thus I'm thinking its not the part I really want.

My short term plan is to use a 65c51 (the Rockwell part specifically) through a UART to USB connection to talk to my PC so I have a terminal. Any suggestions for a good part? Something on a dip would be sweet as a bonus.

I'm also wondering if just using a VIA connection to an Arduino would be a decent way to accomplish the same thing. By far the UART is my first choice though.
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: RS232 line drivers

Post by floobydust »

FTDI make USB-Serial interfaces that accept 5V TTL levels (like the 6551), 3.3V levels and RS-232 levels. I use the 5V and RS232 adapters, but if you're just looking to get a quick path to USB, just get the 5V version. I found this one on Mouser:
http://www.mouser.com/ProductDetail/FTD ... 2R-5V-PCB/

I also use this one in place of a 9-pin D-shell:
http://www.mouser.com/ProductDetail/FTDI/DB9-USB-D5-M/

Both support a 5-wire interface, meaning ground, TxD, RxD, RTS, CTS, which is the proper way to wire up the 6551 as a console. Most terminal programs (like ExtraPutty) will support RTS/CTS flow control.
Dan Moos
Posts: 277
Joined: 11 Mar 2017
Location: Lynden, WA

Re: RS232 line drivers

Post by Dan Moos »

Floobydust, that looks perfect. Its pretty much the part I thought I was getting when I ordered the one I linked to.

Sometimes Mouser filter options kick my butt. I never saw the little TTL serial USB adapter you posted when I searched. Just the RS232 level one. I think I even made 5v logic a filter parameter. I probably got unlucky and had some filter options selected that your part didn't qualify for.
Dan Moos
Posts: 277
Joined: 11 Mar 2017
Location: Lynden, WA

Re: RS232 line drivers

Post by Dan Moos »

just so I'm sure I don't make another mistake...

If I get the second part you posted (the thing that's advertised as a direct replacement for a db-9 connector), it hooks directly to the UART with nothing in between, and I get a USB connection?
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: RS232 line drivers

Post by floobydust »

Correct, the DB-9 (5V) version is designed to replace the connector and bypass the level shifter. Also note that FTDI also make these for 3.3V and RS232 levels. Also note that they make them in both male and female pinouts, i.e., they are reversed on the PCB layout. Also be aware that the DB-9 versions do not provide any power to the PCB interface while some other ones do, meaning you "could" power your board from the USB connection with certain adapters.
Dan Moos
Posts: 277
Joined: 11 Mar 2017
Location: Lynden, WA

Re: RS232 line drivers

Post by Dan Moos »

perfect. I just ordered two. So for my purposes, there's o reason to care if I get a male or female version, correct? My perception is that that is only important if you are swapping a DB-9 for this on an existing PCB. Do I have that right?
User avatar
Arlet
Posts: 2353
Joined: 16 Nov 2010
Location: Gouda, The Netherlands
Contact:

Re: RS232 line drivers

Post by Arlet »

Be careful when ordering cheap TTL-USB converters from Ebay or Aliexpress. I've tried several, and only a few worked correctly.
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: RS232 line drivers

Post by floobydust »

Look at the pinouts between the male and female and also realize the application. Pins 1-9 are reversed between the two. Also note that RI doesn't exist on the 6551 so that pin is unused. In any case, you can simply directly connect to the 6551.
Dan Moos
Posts: 277
Joined: 11 Mar 2017
Location: Lynden, WA

Re: RS232 line drivers

Post by Dan Moos »

I used Mouser.
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: RS232 line drivers

Post by BigDumbDinosaur »

Dan Moos wrote:
I have this:

http://www.mouser.com/Search/ProductDet ... RS232-PCBA

I'm thinking it probably expects true RS232 levels. Thus I'm thinking its not the part I really want.
The unit you have expects TIA-232 voltage swings as input and outputs TIA-232 voltage swings. Hence you will need a suitable transceiver between your 65C51 and the FTDI device. A MAX232 will work.
Quote:
I'm also wondering if just using a VIA connection to an Arduino would be a decent way to accomplish the same thing.
The Arduino would be a crutch in this application. You won't learn anything useful that way. :D
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
Michael
Posts: 633
Joined: 13 Feb 2013
Location: Michigan, USA

Re: RS232 line drivers

Post by Michael »

Late to the party, but... You can get the Microchip MCP2221 USB-to-UART bridge in a 14-pin PDIP package.

Cheerful regards, Mike
EugeneNine
Posts: 59
Joined: 01 Nov 2016

Re: RS232 line drivers

Post by EugeneNine »

I started playing with microchip's converter but it looks like it has to be configured to match the baud rate of the uarts on each end and I can only find windows software to do so.

I was thinking of trying this one
http://www.mouser.com/ProductDetail/Sil ... VSGAFOI%3d
Dan Moos
Posts: 277
Joined: 11 Mar 2017
Location: Lynden, WA

Re: RS232 line drivers

Post by Dan Moos »

Ok Floobydust, I have that male DB-9 to USB 5v FTDI adapter you suggested.

I am getting serial data out of the ACIA to the PC just fine. I do have to hardwire the ACIA's CTS pin to ground to get things to work. Hooking it to the FTDI adapter, it never goes LOW.

I can't get stuff out of the PC though. With my scope probe hooked to the RxD pin (the pin that according to the datasheet with a MALE adapter should go to the RxD pin on the UART), I can't get any action out of it. It just sits HIGH.

I feel that maybe I'm doing something wrong with the handshake lines. I've tried a few things, but not everything.

I'm using RealTerm on Windows. When I send stuff TO the terminal, it looks perfect.

I haven't tried to use my ACIA to request data. My test in that direction has just been scoping that pin, and trying to send stuff out with RealTerm.

I just want to test the thing, so I'm just wondering what the bare minimum that needs to happen for that to work is.
Post Reply