Still fixing a couple terminals - BAUD rate wierdness question - Page 1
Forum section: electronics / repair

author: alank2
author_rank: Super Contributor
timestamp: July 06, 2017, 02:01:28 am
content: Hi Everyone,I bought a couple of vt420 terminals from eBay and both have been probably sitting in a warehouse as they look new, but are 20+ years old.What is odd is that one of them works at 9600/19200/38400 and the other only works at 9600/19200, but not 38400.So I connected a Saleae up and measure the start bit on them and determined this:terminal 2 (38400 does not work, 8/9% is certainly why):com1 9600 9794 +2%19200 19984 +4%38400 41666 +8%com2 9600 9803 +2%19200 20032 +4%38400 41876 +9%terminal 1 (38400 works):com1 9600 9708 +1%19200 19630 +2%38400 40192 +4%My question is this - does it make sense that these percentages widen as the baud rate goes up? Wouldn't they be based on a system oscillator and if that was say 3% fast, would all the baud rates be 3% fast? Am I missing something here?

author: alm
author_rank: Super Contributor
timestamp: July 06, 2017, 02:58:16 am
content: Yes, I would expect so (assuming all errors have the same sign, if there are positive and negative errors, then they may obviously cancel out). Unless the system was measuring its own clock rate relative to a 32 kHz watch crystal, and then adjusted the baud rate dividers to match. But that seems like a rather convoluted way for a system that does not care about power usage. I would expect a system like this to just use something like a 18.432 MHz crystal and divide that down (assuming it uses something similar to the 16550 serial interface).If it uses a standard interface chip like that, try digging up a datasheet and looking at how it is programmed and what kind of clock signal it gets.

author: CJay
author_rank: Super Contributor
timestamp: July 06, 2017, 06:12:55 am
content: Umm, no, the error doubles as the baud rate doubles, it's consistent.Change the crystals.

author: macboy
author_rank: Super Contributor
timestamp: July 06, 2017, 02:14:44 pm
content: Quote from: CJay on July 06, 2017, 06:12:55 amIt is most definitely not consistent.If it operates at 9794 when at 9600 baud, you'd expect it to be at 19588 (9794*2) when at 19200, but it is even higher, at 19984.Absolute maximum total error (one end high and the other low for example) is about 4%. Beyond that, the middle of the last (10th) bit moves far enough to be in error at least some of the time. Even higher error and you get errors in the 9th, 8th, 7th etc. bits.

author: alm
author_rank: Super Contributor
timestamp: July 06, 2017, 02:25:14 pm
content: But this is only the error for the terminal. The other side (e.g. cheap USB-RS232 interface) may also have an error that may or may not have the same sign. So I would say 4% for just the terminal is already borderline (assuming the Saleae is bang-on).

author: alank2
author_rank: Super Contributor
timestamp: July 06, 2017, 02:34:04 pm
content: To calculate the baud rate I am measuring it with a logic analyzer and looking at the start bit width.I noticed there was a problem because a modem I was playing around with refuses to work at 38400 with the one that is 8% off.My concern is that i could tear it all apart and find the crystal, but this doesn't make sense to me. If the crystal is 8% fast, then they should ALL be 8% fast. Unless there is some other algorithm going on to determine the baud rate.

author: alm
author_rank: Super Contributor
timestamp: July 06, 2017, 03:02:07 pm
content: Is there a service manual available for these terminals or at least very similar models (like a previous generation)?

author: alank2
author_rank: Super Contributor
timestamp: July 06, 2017, 03:22:16 pm
content: I've got what is called a service manual, but the main board is an "FRU" and it has virtually no details about fixing it.

author: alm
author_rank: Super Contributor
timestamp: July 06, 2017, 04:12:52 pm
content: Are older models from the same manufacturer (DEC?) any better?

author: alank2
author_rank: Super Contributor
timestamp: July 06, 2017, 08:48:39 pm
content: Ok, scratch those numbers above. They are the result of measuring with a logic analyzer which triggers as 1.4V when combined with a pretty slow slew rate. I connected my picoscope and looked at it and one terminal is runnig 0.2% fast than the other one 0.06% slow. Still doesn't explain why the modem will talk 38400 with one and not the other. Both signals look very close on the picoscope. Could the slow slew be a result of the ridiculous 10 foot modular DEC connect cable?

author: Silveruser
author_rank: Regular Contributor
timestamp: July 06, 2017, 09:37:48 pm
content: It's been a while since I've played with RS232 but here's a couple thoughts. RS232 should tolerate quite a bit of distortion, we used to test with 25% or more. What voltages are the terminals using, +-12v would be common back then. If you're connecting to a USB adapter you might not be getting any where near that. And yes the 10ft cable could have lots of capacitance distorting the signals espically at the higher rates. Try a shorter cable and take a look at the voltages.George

author: alm
author_rank: Super Contributor
timestamp: July 06, 2017, 09:46:05 pm
content: I believe 10 ft is close to the upper limit for higher baud rates. Although I would not expect DEC to ship sub-standard cables.

author: Nusa
author_rank: Super Contributor
timestamp: July 06, 2017, 09:50:40 pm
content: 12V would be common, but anything from 5V to 15V would still be within the rs232 standard.Have you considered that perhaps it's your modem that's being overly picky about something, not the terminals?

author: alank2
author_rank: Super Contributor
timestamp: July 06, 2017, 09:54:30 pm
content: The cable looks pretty nice at least it has a nice jacket, but it has been bent up and sitting in a box for probably 20 years, it is definitely too long. I don't have any dec connector connectors, crimper, or cable, so I can't make more of it easily, but I can get some DB25 connectors off of eBay and turn each one cable I have into two. I will probably just leave the modular part 12 inches or so and then go right into the DB25. They are interesting cables in that they are not straight through but rolled, this was their way of allowing all devices be "DTE" - each cable was in effect a null modem. I found a lot of good info here:https://www.lammertbies.nl/comm/cable/dec-mmj.htmlThe terminal was doing something like -6V to +6V.You may be right about the modem, it is an old hayes accura external. Both terminals do 38400 to my usb adapter just fine. The modem seems touchy about baud rate. It waits for you to type an A and then tries to lock that into some grouping 9600, 19200, 38400, etc.

author: helius
author_rank: Super Contributor
timestamp: July 06, 2017, 09:57:42 pm
content: The modular DEC cable (MMJ) will be using RS-423, which has a +/- 6V swing about ground. 10 ft is nowhere close to the length limit; it is actually 1.2km.

author: alm
author_rank: Super Contributor
timestamp: July 06, 2017, 10:02:42 pm
content: Quote from: helius on July 06, 2017, 09:57:42 pmAt 38400 baud? I find that hard to believe.Quote from: alank2 on July 06, 2017, 09:54:30 pmDid you measure the baud rate from the modem? Maybe its crystal has drifted.