You are on page 1of 11

Distortion Testing of My AN/FGC-25 Teletypewriter Set

by Random73
June 29, 2015
I do not have an oscilloscope, so I wrote a program for my
MC6800-based microcomputer to capture samples of the 60ma
current loop during signaling by the keyboard or the tape reader,
in order to measure any bias or end distortion that might be
present. I have never before had a capability to make any such
measurements on this teletype set, or any other set.
The program waits for a mark-to-space transition and then
samples the loop until the sample buffer is full (7935 samples).
Version 3 of the program simultaneously samples the output of
the 1 millisecond timer on the TTY interface card. After filling
the sample buffer the program dumps the buffer to the MIKBUG
console terminal, for porting into Microsoft Excel 2010.
1. Version 1 Testing June 17, 2015, Results
With version 1 I used MIKBUG Punch command to save the sample
buffer after a capture. Today (June 27) I reloaded the buffer
from the portions that I had saved on the 17th, and then ran
just the dump portion of version 3 so that I could plot the data
in Excel.
Keyboard Capture of June 17, Letter "R";

Note the "glitch" shortly after each space-to-mark transition.


The space-to-mark transition starting the STOP bit occured at
sample #1146. The elapsed time since start of the START bit
should be 6*22 = 132 ms. The sampling period was therefore
approximately 132/1146 = 115.2us. The sampling rate was
1/.0001152 = about 8.7 kilosamples per second.

Keyboard Mark Interval Durations:


Sample 396 through 567
172 samples = 19.81 milliseconds
Sample 770 through 943
174 samples = 20.04 milliseconds
Keyboard Space Interval Durations:
Sample 568 through 769 202 samples = 23.27 milliseconds
Sample 944 through 1145 202 samples = 23.27 milliseconds
These estimates suggest that there was some slight "space bias
distortion" occurring in the keyboard transmitter, about
(1.27/22)*100 = 5.8%.
Tape Reader Capture of June 17, Letters "YRY";

June 17, 2015 Tape Reader "YRY" Signal Capture


This tape reader snapshot captured 3 complete signaling
intervals, or 3*163 = 489ms. Samples 2 through 4206, or 4205
samples, should correspond to 489ms. 489/4205 = 116.29us for the
sampling period, or 8.60ksps.
There were no observed glitches after space-to-mark transitions.
Tape Reader Space Interval Durations:
Sample 002 through 240 239 samples = 27.79 milliseconds
Sample 386 through 612 227 samples = 26.40 milliseconds
Tape Reader Mark Interval Durations:
Sample 241 through 385
145 samples = 16.86 milliseconds
Sample 613 through 765
153 samples = 17.79 milliseconds
These estimates suggest that there was significant "space bias
distortion" occurring in the tape reader, (5.79/22)*100= 26.3%.

2. Version 2 Testing June 25, 2015, Results


In version 2 I increased the sampling rate. My target was 10
kilosamples per second. Here is the keyboard waveform after I
adjusted the keying contact, to reduce the spacing bias;
Keyboard Capture June 25, "RYR", manually typed;

I forgot to use the REPEAT key, so the stop bit intervals are
longer than 31ms. Reacall that the keyboard data of June 17
showed glitches. No keyboard "glitches" occurred in this capture.
Samples 2-1251 cover 6 bit periods, should span 132ms;
132/1250 = 105.60us per sample, or 9.47ksps.
Keyboard Mark Interval Durations:
Sample 416 through 629 214 samples = 22.60 milliseconds
Sample 831 through 1051 221 samples = 23.34 milliseconds
Keyboard Space Interval Durations:
Sample 630 through 830 201 samples = 21.23 milliseconds
Sample 1052 through 1251 200 samples = 21.12 milliseconds
The bias distortion is now 6% marking bias (worst case), so I
over-adjusted the keying contact.

Tape Reader Capture June 25- "YRYR"

Note that space-to-mark glitches started happening on the 2nd


character and continued thereafter. Recall that the tape reader
data on June 17 did not show any glitches.
I have not yet tried to reduce the tape reader's spacing bias so
there is no need yet to tabulate mark and space intervals again
for tape reader.
3. Version 3 Testing June 26, 2015 Results
In version 3 I adjusted the sampling rate again, and I added
sampling of the 1 millisecond timer output from the TTY
interface card. The sampling rate estimate for version 3 is
102.7us per sample, or 9.74ksps. My target was 10ksps. Version 3
also upscales the current loop sample values from 1 to 4, so
that they are more clearly distinguishable from the timer
samples when both are plotted on the same Excel chart.
I adjusted the keyboard keying contact again, in an attempt to
reduce the marking bias. Here are the measurements after that
adjustment.
Keyboard June 26- "YYY" using REPEAT key, Version 3

The first and third mark pulses did not glitch. This glitch
thing is a real mystery, especially since it is happening
intermittantly on both the keyboard and the tape reader.
4

I counted the 1ms timer periods in the data base to manually


construct reference marks for the theoretical bit transition
instants. I set the reference mark values to 5 so they would
stand out;
Keyboard June 26, 1st character compared to reference markers

The keyboard timing/bias performance looks great!


Tape Reader June 26, 1st character compared to reference markers

The tape reader's "spacing bias" is now clearly evident. There


is also some slght "marking end" distortion.
I am more concerned about the glitching phenomenon. It is
happening on both the keyboard and the tape reader, frequently.
I have studied figures 60 and 115 in TM11-2246 and I understand
how this serial keying mechanism is supposed to work. I thought
I had cleaned the keying contacts well enough, but maybe not.
My next planned action is to remove and thoroughly inspect and
clean the keying contacts (again) for both the keyboard and tape
reader, this time using burnishing tool (I will have to get one)
as instructed in the manual.
Any suggestions or advice would be most appreciated.

APPENDIX A- A Brief History of This Set

My Kleinschmidt AN/FGC-25 Teletypewriter Set


I acquired this set in 1977 in two phases. First I bought the
printer unit and the manual, from two different sellers, at a
ham radio swap meet in Atlanta, GA. After studying the manual I
wrote to the seller, in Mobile, AL, and offered to buy the rest
of the set. I drove there one Saturday in my '75 Chevy Monza
hatchback and somehow managed to get the reperforator and the
table in my car and back to Marietta, GA.
I spent the next year or so, off and on, performing a complete
tear down, restoration, and rebuild of the set. Mr. Fred Schmidt
of Typetronics supplied all the parts I needed (he had sold the
manual to me at the swap meet). I had to replace several springs
that had rusted through, and some other corroded parts.
When I moved to California in fall of 1979 this set came with me
on the moving van. It had been mostly idle and in storage from
1983 until late spring 2014, when I began its resurrection.
6

APPENDIX B- Distortion Tester Program Listing


--PAGE

00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054

001

DISTORTI

NAM
OPT

DISTORTION
O,S,NOG

TESTER V3

*
* JUNE 26, 2015 BY D.R.SENTZ
*
* THIS PROGRAM SAMPLES THE CURRENT LOOP BEGINNING AT
* THE 1ST DETECTED MARK-TO-SPACE TRANSITION, WHICH
* NORMALLY INDICATES THE BEGINNING OF A START BIT. I
* ESTIMATE THAT THERE SHOULD BE ABOUT 220
* SAMPLES PER BIT PERIOD (22MS), UNTIL THE MEMORY
* BUFFER IS FULL. SAMPLES ARE STORED BEGINNING AT
* THE HIGHEST ADDRESS OF THE BUFFER.
* UPDATE V3: ADDED SAMPLING OF THE 1MS TIMER OUTPUT
* AND BOTH SAMPLES STORED TO SAME MEMORY LOCATION.
* ADDED DUMP OF SAMPLE BUFFER TO CONSOLE AFTER
* BUFFER IS FULL, IN FORMAT
*
<CR><LF>LOOPSAMPLE,TIMERSAMPLE
* THIS FORMAT ENABLES EASY PORT TO EXCEL 2010 FOR
* PLOTTING AND ANALYSIS.
*
1EFF
EOBADR EQU
$1EFF
8008
PIA
EQU
$8008
PIA ON MEK6800D1 CPU BOARD
A048
RESTRT EQU
$A048
E07E
PDATA1 EQU
$E07E
STRING OUTPUT SUBROUTINE
E1D1
OUTEEE EQU
$E1D1
CHARACTER OUTPUT SUBROUTINE
E0E3
MIKBUG EQU
$E0E3
MIKBUG REENTRY POINT
*
1F00
ORG
$1F00
1F00 CE 8008
LDX
#PIA
*
* CONFIGURE PIA REGISTERS A AND B
*
1F03 4F
CLR A
INIT PIA REG. B
1F04 A7 01
STA A 1,X
POINT 8008 TO DDRA
1F06 A7 03
STA A 3,X
POINT 800A TO DDRB
1F08 86 FE
LDA A #$FE
REG.B B7-B1=OUTPUTS, BO=INPUT
1F0A A7 02
STA A 2,X
PUT TO DATA DIR. REG.B
1F0C 86 7F
LDA A #$7F
REG.A B7=INPUT, B6-B0=OUTPUTS
1F0E A7 00
STA A 0,X
PUT TO DATA DIR. REG.A
1F10 86 04
LDA A #4
POINT TO I/O REG.
1F12 A7 01
STA A 1,X
8009 IS PIA CONTROL REG.A
1F14 A7 03
STA A 3,X
800B IS PIA CONTROL REG.B
1F16 86 01
LDA A #1
NOW OUTPUT A MARK SIGNAL TO
1F18 A7 00
STA A 0,X
CLOSE THE TTY CURRENT LOOP
*
* WAIT FOR MARK-TO-SPACE TRANSITION ON LINE.
*
1F1A A6 02
WAIT
LDA A 2,X
SAMPLE THE LINE STATE
5 C
1F1C 26 FC
BNE
WAIT
IF MARK, WAIT FOR SPACE
4 C
1F1E CE 1EFF
LDX
#EOBADR ELSE INIT BUFFER POINTER 4 C
*
1F21 F6 8008 NEXT
LDA B PIA
SAMPLE THE TIMER STATE
4 C
1F24 C4 80
AND B #$80
MASK ALL BUT INPUT BIT
2 C
1F26 1B
ABA
MERGE; A=A+B
2 C

--PAGE

002

DISTORTI

00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108

1F27 A7 00
1F29 09
1F2A 27 0C
1F2C C6 06

1F2E 5A
1F2F 27 02
1F31 20 FB
1F33 B6 800A
1F36 20 E9

1F38
1F3B
1F3D
1F3E
1F40
1F41
1F42
1F44
1F47
1F48
1F4A
1F4B
1F4C
1F4E
1F51
1F54
1F57
1F5A
1F5D
1F5E
1F60
1F63
1F66

CE
A6
36
84
48
48
8B
B7
32
84
49
49
8B
B7
FF
CE
BD
FE
09
26
CE
FF
7E

1EFF
00

1F69
1F6B
1F6C
1F6D
1F6E
1F6F

0D
0001
2C
0001
04
0002

01
30
1F6B
80
30
1F6D
1F6F
1F69
E07E
1F6F
DB
1F00
A048
E0E3

STA A 0,X
SAVE SAMPLES IN ONE LOC. 6 C
DEX
4 CYC
BEQ
DONE
4 CYC
* VARY THE ARG. BELOW TO ADJUST SAMPLE PERIOD.
LDA B #6
SETS SAMPLING RATE
2 C
*
*WAIT LOOP BELOW IS 10 CPU CYCLES. I WANT ABOUT
*220 SAMPLES PER BIT (100US SPACING)
*
WLOOP DEC B
2 CYC
BEQ
CONT
4 CYC
BRA
WLOOP
4 CYC
*
CONT
LDA A PIA+2
GET NEXT LOOP SAMPLE
4 C
BRA
NEXT
AND KEEP GOING
4 C
*
* DUMP THE SAMPLE BUFFER TO THE CONSOLE USING
* <CR><LF> BETWEEN EACH SAMPLE. COPY/PASTE THE
* DUMP FROM TERA TERM WINDOW TO EXCEL, THEN
* SELECT THE DATA AND INSERT 2D LINE CHART
* TO PLOT THE SAMPLE DATA.
*
DONE
LDX
#EOBADR INIT BUFFER POINTER
OUTLP LDA A 0,X
GET SAMPLES
PSH A
AND A #1
MASK ALL BUT LSAMP
ASL A
ASL A
QUADRUPLE IT TO 4
ADD A #$30
CONVERT TO ASCII
STA A LSAMP
PUL A
AND A #$80
MASK ALL BUT TSAMP
ROL A
ROL A
PUT IT IN LSB
ADD A #$30
CONVERT TO ASCII
STA A TSAMP
STX
XTEMP
LDX
#OSTRNG
JSR
PDATA1
LDX
XTEMP
DEX
DECREMENT POINTER
BNE
OUTLP
IF >0 THEN KEEP DUMPING
LDX
#$1F00
SET UP PROG RESTART ADDRESS
STX
RESTRT
JMP
MIKBUG
AND EXIT
*
* DEFINE OUTPUT PRINT STRING
*
OSTRNG FCB
$0D,$0A
LSAMP RMB
1
FCC
/,/
TSAMP RMB
1
FCB
$04
EOT
XTEMP RMB
2
NOT THE SAME AS MIKBUG XTEMP

--PAGE

003

DISTORTI

00109
00110 A048
00111 A048 1F00
00112

*
ORG
FDB
END

$A048
$1F00

INITIALIZE PROG. COUNTER

TOTAL ERRORS 00000


DISTORTION TESTER V3 JUNE 26 2015
S00B0000444953544F52544982
S11E1F00CE80084FA701A70386FEA702867FA7008604A701A7038601A700A642
S11E1F1B0226FCCE1EFFF68008C4801BA70009270CC6065A270220FBB6800A2E
S11E1F3620E9CE1EFFA60036840148488B30B71F6B32848049498B30B71F6DE5
S11D1F51FF1F6FCE1F69BDE07EFE1F6F0926DBCE1F00FFA0487EE0E30D0AB2
S1041F6C2C44
S1041F6E046A
S105A0481F00F3
S9

APPENDIX C- 60mA Current Loop Interface for Microcomputer

10

Appendix D- Demonstration Videos on Internet


Episode 1

http://www.zippcast.com/video/a73d8b3f9842714ee97
An introduction and power up, March 2015

Episode 2

http://www.zippcast.com/video/a722081e609549512fa
Explanation of blown fuse at power up, and repair
Substitute circuit for 1/16 amp slo-blo fuse
Demonstration of tape reader and printer working

Episode 3

http://www.zippcast.com/video/bee7e30fdfdb47e24da
Keyboard "simultaneous mode" and reperforator
Keyboard contact bail fix
Keyboard "sequential mode" and printer

Episode 4

http://www.zippcast.com/video/31acf5aa666f99256a9
Sending ASCII text file from Macintosh 512K to
microcomputer, and printing the file on the AN/FGC-25

Demo

http://www.zippcast.com/video/8a0f40e3806bff93b64
Sending Baudot-coded text file from teletype paper
tape reader to Windows 7 PC running terminal emulator
"Tera Term" (via the MC6800 microcomputer).

11