6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Sep 21, 2024 10:49 am

All times are UTC




Post new topic Reply to topic  [ 42 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: Mon Feb 22, 2021 1:27 am 
Offline
User avatar

Joined: Mon Feb 01, 2021 1:07 am
Posts: 44
Location: Sydney, Australia
floobydust wrote:
There are several different UART to USB interfaces from FTDI. The one I've mainly used on my SBCs is this:

Attachment:
DS_DB9-USB-15654.pdf
They offer both male and female versions in interface levels of 3.3V, 5V (TTL type) as well as RS-232 voltage levels. As I'm connecting directly to the UART, I just use the 5V version in MALE... and use a standard DB-9 (also male) connector for the PCB layout.

I've also used their LC234X, which is a small PCB you solder a header on... this one has a jumper for 3.3V or 5V.

Just refer to the doc file for connection. They have drivers for OSX, Windows and Linux.

Regarding the 65C51... if you don't plan on running a fast CPU clock, I'd suggest finding an older CMOS version from Rockwell... as these were available in 4MHz. This will work out better overall... but I still recommend using a NXP UART these days.

Thanks heaps floobydust!

I have been considering going with an NXP UART as the 65C51 bug is quite annoying, and also disappointing that it (most likely) won't ever get fixed.
I've changed my mind a couple of times on which way too go. I'll go read up further and make a decisions soon.

_________________
Greetings Professor Falken.


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 22, 2021 6:02 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8390
Location: Midwestern USA
Firefox6502 wrote:
I have been considering going with an NXP UART as the 65C51 bug is quite annoying, and also disappointing that it (most likely) won't ever get fixed.

The TxD bug was discovered nearly eight years ago and WDC acknowledged its existence shortly after its discovery. Given that the 65C51 represents the state of the art of 1976 and there's little incentive for current designs to use such technology when so many better UARTs are available, you can be safe in concluding it will not get fixed. The cost to redo the mask would not likely be recovered in subsequent sales. WDC is probably sitting on a pile of unsold inventory that will eventually be scrapped and written off.

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


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 22, 2021 8:04 am 
Offline
User avatar

Joined: Mon Feb 01, 2021 1:07 am
Posts: 44
Location: Sydney, Australia
BigDumbDinosaur wrote:
Firefox6502 wrote:
The TxD bug was discovered nearly eight years ago and WDC acknowledged its existence shortly after its discovery. Given that the 65C51 represents the state of the art of 1976 and there's little incentive for current designs to use such technology when so many better UARTs are available, you can be safe in concluding it will not get fixed. The cost to redo the mask would not likely be recovered in subsequent sales. WDC is probably sitting on a pile of unsold inventory that will eventually be scrapped and written off.
Realism... how sobering.
Fair call on WDC regarding the cost to fix the 65C51s and recovery given the current state of UARTs. Thanks for the info, it makes total sense.

_________________
Greetings Professor Falken.


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 22, 2021 8:19 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8510
Location: Southern California
If you have SPI for other things already, one UART I have exercised (although not put to serious use yet), and like, is the MAX3100:

  • small: 14-pin DIP or 16-pin QSOP or 24-"pin" (they're not really pins) TQFN
  • 8-word transmit and receive buffers
  • has an IrDA mode as well
  • all common bit rates from 300bps to 230kbps from a standard 3.6864MHz crystal (smaller than a crystal oscillator)
  • runs on +2.7V to +5.5V
  • Schmitt-trigger inputs

_________________
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  
PostPosted: Mon Feb 22, 2021 8:33 am 
Offline
User avatar

Joined: Mon Feb 01, 2021 1:07 am
Posts: 44
Location: Sydney, Australia
GARTHWILSON wrote:
If you have SPI for other things already, one UART I have exercised (although not put to serious use yet), and like, is the MAX3100:

  • small: 14-pin DIP or 16-pin QSOP or 24-"pin" (they're not really pins) TQFN
  • 8-word transmit and receive buffers
  • has an IrDA mode as well
  • all common bit rates from 300bps to 230kbps from a standard 3.6864MHz crystal (smaller than a crystal oscillator)
  • runs on +2.7V to +5.5V
  • Schmitt-trigger inputs
Now that you mention SPI, I have been considering it in the last couple of days. Daryl has an SPI interface I've been looking to build. Thanks! Looking into it...

_________________
Greetings Professor Falken.


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 22, 2021 1:48 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1228
Location: Soddy-Daisy, TN USA
BigDumbDinosaur wrote:
Looks okay to me. Please see my earlier post about using MLCCs as charge pump and bypass capacitors—you can save a few pennies on the build cost and avoid having to worry about polarity. Also, it would be a good idea to place an electrolytic close by the MAX238 to help stabilize Vcc. I use 100 µF for that purpose, Panasonic part number EEU-FR1A101B.


Thanks for the advice! I've added a 100uF cap near the MAX238.
I will look into the MLCC's as well.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 26, 2021 9:16 am 
Offline

Joined: Mon Jun 24, 2019 1:13 pm
Posts: 34
Maxim and others make a lot of money out of the RS232 lie. The truth is that actual RS232 receivers (even the venerable MC1489) only need around 1.5V to register a signal and anything below 1.2V is not a signal, so there is no need for +/-12V. But wait! There's more! The MAX232 and other drivers don't even output that high, they are typically more like a noisy +/-6V, and yet even there we know that any RS232 device only needs TTL or even 3.3V logic levels to work.

I have designed many kinds of datacomms equipment over many decades and many specify "RS232" and so I dutifully use these 232 chips knowing that they aren't really needed at all. In fact I have used resistors from RS232 inputs back to the micro to limit any RS232 voltage current and this works better than a 232 chip. But as I mentioned, because much of this is professional equipment I need to be "compliant" to the standards, but my own and hobbyist stuff only needs to be "compatible".

BTW, RS232 chips are slew rate limited and have a 300 ohm resistance which back in the 1960's was meant to protect delicate and expensive transistors from shorts. Chips are very resilient to shorts yet they still have that 300 ohm resistance.

By way of contrast we are used to using logic levels over much greater distances at much greater speeds, so there is no advantage to using RS232, in fact there are lots and lots of disadvantages. Go MAXIM! Make more money! :)


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 26, 2021 9:59 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8510
Location: Southern California
pbj wrote:
Maxim and others make a lot of money out of the RS232 lie. The truth is that actual RS232 receivers (even the venerable MC1489) only need around 1.5V to register a signal and anything below 1.2V is not a signal, so there is no need for +/-12V. But wait! There's more! The MAX232 and other drivers don't even output that high, they are typically more like a noisy +/-6V, and yet even there we know that any RS232 device only needs TTL or even 3.3V logic levels to work.

My data sheet for the 1489 says it interprets -3.9V to -25V as a logic '1', and +3.0V to +25V as a logic '0'. Between -3.9V and +3.0V is undefined. It also says the response-control input can shift that. If you have something that can get away with 1.2V and 1.5V, more pow'r to ya; but I'd rather not count on it. The RS-232 spec. of course says the receiver is to interpret -3V to -25V as a logic '1', and +3V to +25V as a logic '0', and the transmitter is to put out at least ±5V, not 4.9 or less.

I haven't read the history of the development and decisions that were made 60 years ago, but it doesn't seem like it was really necessary to use the higher voltages. TTL was already pretty low-impedance so it should be pretty immune to the noise problems the higher voltages were supposedly there to remedy, but RS-232 does slightly precede TTL. I stick to the higher voltages partly to be compatible with my older PC with COM ports, and partly to avoid damage to 5V receiving logic from putting ±12V (give or take) into it (although I could put circuit protection on it). I always have the higher voltages on the board for other things anyway though, so why not use it for RS-232 also.

_________________
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  
PostPosted: Fri Feb 26, 2021 12:20 pm 
Offline

Joined: Mon Jun 24, 2019 1:13 pm
Posts: 34
These are simply facts vs "play-it-safe" tradition.

Look at the transistor input stage and RTM more closely and you will see that there is no magic there at all. Some early RS232 receiver chips did indeed have a 3V negative threshold and a 3V positive threshold and could therefore truly be said to be true RS232 and more immune to noise, but there were too many problems with this not working with that whereas the simpler 1489s worked with everything. The first charge pump type RS232 chips also used the same receiver thresholds as the 1489. Looking at a typical MAX232 datasheet shows that the Vit+ is 1.7V (or 1.5V) and Vit- is 1.2V and even the max and mins are well within compatibility with 3.3V logic levels. Heck I could run a 100 meter cable to these so called RS232 chips with just 3.3V logic signals and they would work just fine at 921600bd.

TTL is not low impedance and make terrible line drivers. Look at the NPN emitter follower that has a series diode to source the output. Not only was the voltage reduced from 5V down to around 3.6V or so, but also they could not source much current, although the NPN for the sink stage could handle more current. This also suited the input stage too but there was always a big problem with fan-out where an output had a limit as to how many inputs it could drive. That's why it was common to have pullups and active low signals rather than the more conventional pull-down active high.

A resistor to limit the current is all you need for the input plus a pull-down on the RS232 side. Driving RS232 COM ports on PCs from logic, even 3.3V logic actually performs much better and at much higher baud rates than slew-rate and current limited RS232 drivers can handle. I just updated the firmware on one of my older designs that use single-mode fibre to link RS232 ports over long distances and those RS232 signals look slow, noisy, and terrible slewing from -6 to +6V volts. All high speed stuff these days uses much lower voltages and thresholds and differential drive (LVDS etc). RS232 drivers top out at a measly 120kbd and some maybe higher, but not too much higher due to the inherent limitations of a 60's standard that considered 1200bd really hammering.

I said all this simply because the "interweb" is full of "gotta have this MAX type chip" for RS232 but the truth is you don't.


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 26, 2021 6:49 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8390
Location: Midwestern USA
pbj wrote:
I said all this simply because the "interweb" is full of "gotta have this MAX type chip" for RS232 but the truth is you don't.

Oh, really? Most of those "gotta"s are actually recommendations for any machine that has only a 5 volt source available—which would be a large number of hobby systems. The MAX series are convenient because they are a single-chip solution requiring only 5 volts and some inexpensive capacitors to make a functioning TIA-232 transceiver circuit.

I don't know what your beef is with Maxim, but you are coming across as someone with some sort of vendetta. If you feel the MAX units cost too much just use the 1488 and 1489 line drivers and provide the necessary voltages to operate them (a PC power supply can take care of that). In my POC units, I didn't want to be bothered with providing +/- 12 to run line drivers and so elected to use the MAX units, which work fine at 115.2Kbps. Succinctly, I spent a little more to get more design convenience. That's how life works in most situations: convenience comes with a cost.

As for the voltages specified by the standard, that has to do with making the data link resistant to noise and transmission line effects. By design, TIA-232 (and its cousins) is a low-impedance interface, which when combined with the use of opposite-polarity signals to differentiate between mark and space, makes it readily adaptable to many interfacing applications (shop machines, for example) where noise and signal distortion are a problem. TIA-232 can be operated over considerable distances, despite being an unbalanced interface. My (very long) experience with TIA-232 hookups is if the transmitting device can swing TxD between +12 and -12, the interface will easily handle 100 meters at high speed. 100 meters, coincidentally, is the outer limits of Ethernet without use of repeaters, a differential interface using no ground reference.

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


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 27, 2021 11:16 am 
Offline

Joined: Mon Jun 24, 2019 1:13 pm
Posts: 34
Oh boy .... vendetta? You really don't know if you say that EIA-232 is "low-impedance" when all the datasheets say "300 ohm" output resistance. That is never "low impedance".

The original 232 standard offered noise immunity, albeit at very low speeds (20kbps max although 250kps is still slow) over relatively short (50 feet max) unbalanced lines but that is the point. Even if properly adhered to with a +/-3V receiver sensitivity the standard is sadly lacking but worse still, receivers do not have anywhere near this level of "noise immunity" with only a few hundred millivolts of a noise band centred around +1.5V or so. That's because it is a simple transistor input stage with very limited hysteresis.
Attachment:
MC1489 INPUT.png
MC1489 INPUT.png [ 21.23 KiB | Viewed 659 times ]

Drive that long cable instead with 0-5V into a CMOS receiver with a termination resistance and you will find that it can run at higher speeds etc. One of my early designs were R6511AQ based POS terminals and before I started using RS-485 for multidrop, I used a simple PNP driving a multidrop line from +5V for hundreds of meters over standard 4-core data cable. They just worked although RS-485 allowed much higher speeds and more immunity to noise.

I put MAX chips in decades of commercial product so obviously I do what I need to do, and don't do what I don't need to do. Do the science, do the math, connect the chips up to the scope and meters etc and vary those input voltages which will confirm exactly what I have said.

I've said what I've said for hobbyists overly concerned with meeting the RS-232 standard by using any brand of special RS-232 chips when the simple boring truth is you don't need to.


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 01, 2021 1:37 am 
Offline

Joined: Mon Jun 24, 2019 1:13 pm
Posts: 34
Fortunately none of us "has to" use RS232 in hobby designs even with the few old bits of electronics that still use them as I have clearly outlined. Irked though I may be, I have to use RS232 for product compliance in the air-traffic and transport industry which still uses a lot of this stuff, even in major international airports. Using RS232 there doesn't cost me a cent, instead it makes me money.


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 46 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: