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

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Fri May 27, 2016 1:41 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
None of my recent (2009+) computers have a true 9-pin serial port. Which is a shame.

I use a USB to serial adapter for programming micro-controllers and I'm pretty sure it has the FTDI chip inside.

On my SBC I'm building, I want to include a 65C51 but I've seen designs where people use another MAX-232 chip as well.

Am I correct in thinking that I won't really need one (MAX-232) if I only use the USB/serial adapter I have?

Can the ACIA talk directly to that adapter I have? I'm in the process of learning more about that chip.

BTW, this is the adapter I have:

https://www.parallax.com/product/32201

Thanks!

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Fri May 27, 2016 1:53 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
That looks fine to me: the crucial thing is that it supports TTL levels (or even 3V3 levels) and doesn't need a line driver. It's not suitable for long distance but will probably be OK up to a metre.

The other day I connected up a 3V3 serial from a raspberry pi to a USB serial adapter, using paper clips. It was fine at 115200 baud.


Top
 Profile  
Reply with quote  
PostPosted: Fri May 27, 2016 2:22 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
Hmmm. It could be possible that my main computer could sit on the other side of the room from my SBC. Maybe 10 feet.

What would you recommend then?

Quote:
using paper clips. It was fine at 115200 baud.


That. Is. Awesome.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Fri May 27, 2016 2:31 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
You'll need more than paper clips! You'll certainly be safe with a proper driver and cables. To see if you can get away with less, you'll have to experiment I think.


Top
 Profile  
Reply with quote  
PostPosted: Fri May 27, 2016 2:38 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
Pardon my ignorance, but is the MAX-232 the "driver" in this example? Still not sure what that chip is really used for.

Thanks.

Oh, I do like the idea of a string of paperclips going across the floor. That's the "manly" way to do it. LOL Oh wait...barbed wire. That's how I should do it.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Fri May 27, 2016 2:42 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Yes, full RS232 uses higher voltages, and the MAX chip does the conversion.
"The drivers provide TIA-232 voltage level outputs (about ±7.5 volts) from a single 5-volt supply by on-chip charge pumps and external capacitors. This makes it useful for implementing TIA-232 in devices that otherwise do not need any other voltages. The receivers reduce TIA-232 inputs, which may be as high as ±25 volts, to standard 5-volt TTL levels. These receivers have a typical threshold of 1.3 volts and a typical hysteresis of 0.5 volts."
- https://en.m.wikipedia.org/wiki/MAX232

For extra distance/robustness, you can use differential signalling.


Top
 Profile  
Reply with quote  
PostPosted: Fri May 27, 2016 2:45 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
You could also use a long USB cable to make up some of the distance...
"USB Cable Length Limitations: The USB specification limits the length of a cable between full speed (or high speed) devices to 5 meters (16 feet 5 inches) and for low speed devices the limit is 3 meters (9 feet 10 inches)."


Top
 Profile  
Reply with quote  
PostPosted: Fri May 27, 2016 2:57 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
Yeah, I think I could make the USB cable work. Any serial device I put on my retro SBC will normally never be more than a few feet away. I could probably even re-arrange some stuff on my desks to shorten that distance.

So, knowing that, do you think I can get away with using just a 65C51 and nothing else?

Thanks

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Fri May 27, 2016 3:17 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
I would think so - I'd certainly give it a try.


Top
 Profile  
Reply with quote  
PostPosted: Fri May 27, 2016 7:30 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8506
Location: Midwestern USA
cbmeeks wrote:
Pardon my ignorance, but is the MAX-232 the "driver" in this example? Still not sure what that chip is really used for.

The MAX-232 (also -238 and -248) is a transceiver that does several things for you:

  1. Level conversion. UART inputs and outputs operate at (mostly) TTL voltage levels, and are inverted logic-wise relative to TIA-232. TIA-232 swings (roughly) between plus and minus 12 volts relative to ground. The MAX-232 and brethren handle the voltage disparity and also invert the logic.

  2. Line driving. The output of the MAX-232 is a low impedance current source that can drive relatively long cables (I've tested them out to several hundred feet). The UART doesn't have that kind of drive, so the signal would rapidly fade with distance.

  3. Protection. The UART would probably be fatally damaged if exposed to a voltage spike more than about 25 percent above its nominal Vcc rating. The MAX-232 can tolerate as much as ±30 volts on its inputs and up to ±15 volts on its outputs.

Quote:
Oh, I do like the idea of a string of paperclips going across the floor. That's the "manly" way to do it. LOL Oh wait...barbed wire. That's how I should do it.

Automobile battery cables would work. I-squared-R losses would be very low. :D

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


Top
 Profile  
Reply with quote  
PostPosted: Fri May 27, 2016 7:42 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
I see BDD did a good job of answering while I was writing, but I'll post anyway.

cbmeeks wrote:
Pardon my ignorance, but is the MAX-232 the "driver" in this example? Still not sure what that chip is really used for.

Thanks.

Oh, I do like the idea of a string of paperclips going across the floor. That's the "manly" way to do it. LOL Oh wait...barbed wire. That's how I should do it.

From my RS-232 primer:

      The transmitting standard goes like this: Logic 0 is +5V to +15V. Logic 1 is -5V to -15V. -5V to +5V is the transition area. Transmitters can handle indefinite shorts to each other or to ground without damage. Again, the voltages seem backwards; but it's because the line drivers and receivers invert the signal.

      Powering the line drivers from ±12V used to be pretty standard, but line drivers like the MC145407 and the well known MAX232 and its many relatives use internal switched-capacitor voltage converters and multipliers to get (almost) ±10V from a single 5V supply. Still, if you have ±12 (or something in that neighborhood) on the board to power the line drivers, ones like the 1488 or MC145406 take less board space, because they don't need external capacitors and the extra pins to connect to them.

      For low-power hand-held applications where battery power is saved at all costs, it is also possible to power the line drivers with power taken from the receivers' input signals. A unit designed like this would have to be connected to another computer that will supply the power. Obviously it won't work if it is connected to another one of the same which also supplies no power, especially if you have a hand-held terminal with no power source of its own.

      The receiving standard goes like this: Logic 0 is +3V to +25V. Logic 1 is -3V to -25V. -3V to +3V is transition area. Specified impedance for one receiver load is 3KΩ to 7KΩ. One output can usually drive quite a few inputs (and LEDs for troubleshooting).

      To reduce problems with noise and interference, the receiver usually has some hysteresis to keep its output steady at the last valid logic level while the input is crossing that transition area, and then outputs a fast edge to the UART when it does go to the other logic level.

Quote:
So, knowing that, do you think I can get away with using just a 65C51 and nothing else?

I don't know how fast you could go with it (the long cable might require slowing down to get valid data through), but it looks like the logic levels will be ok for the device you linked to. BDD brought up the matter of possible damage from static discharge. You'll have to be careful, or add some other kind of protection. You could use something like 74LS__ parts for that, but then you might as well just use the normal line drivers and receivers.

_________________
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  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

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