distortion testing of my an/fgc-25 teletypewriter set

11
1 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.

Upload: random73

Post on 12-Sep-2015

29 views

Category:

Documents


3 download

DESCRIPTION

I programmed my homebrew microcomputer to sample the 60mA current loop from my teletype set at 10 kilosamples per second during transmission by the keyboard or the tape reader. I found some interesting signaling anomalies as documented in this report.

TRANSCRIPT

  • 1

    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.

  • 2

    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%.

  • 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.

  • 4

    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.

  • 5

    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.

  • 6

    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.

  • 7

    APPENDIX B- Distortion Tester Program Listing ---

    PAGE 001 DISTORTI

    00001 NAM DISTORTION TESTER V3

    00002 OPT O,S,NOG

    00003 *

    00004 * JUNE 26, 2015 BY D.R.SENTZ

    00005 *

    00006 * THIS PROGRAM SAMPLES THE CURRENT LOOP BEGINNING AT

    00007 * THE 1ST DETECTED MARK-TO-SPACE TRANSITION, WHICH

    00008 * NORMALLY INDICATES THE BEGINNING OF A START BIT. I

    00009 * ESTIMATE THAT THERE SHOULD BE ABOUT 220

    00010 * SAMPLES PER BIT PERIOD (22MS), UNTIL THE MEMORY

    00011 * BUFFER IS FULL. SAMPLES ARE STORED BEGINNING AT

    00012 * THE HIGHEST ADDRESS OF THE BUFFER.

    00013 * UPDATE V3: ADDED SAMPLING OF THE 1MS TIMER OUTPUT

    00014 * AND BOTH SAMPLES STORED TO SAME MEMORY LOCATION.

    00015 * ADDED DUMP OF SAMPLE BUFFER TO CONSOLE AFTER

    00016 * BUFFER IS FULL, IN FORMAT

    00017 * LOOPSAMPLE,TIMERSAMPLE

    00018 * THIS FORMAT ENABLES EASY PORT TO EXCEL 2010 FOR

    00019 * PLOTTING AND ANALYSIS.

    00020 *

    00021 1EFF EOBADR EQU $1EFF

    00022 8008 PIA EQU $8008 PIA ON MEK6800D1 CPU BOARD

    00023 A048 RESTRT EQU $A048

    00024 E07E PDATA1 EQU $E07E STRING OUTPUT SUBROUTINE

    00025 E1D1 OUTEEE EQU $E1D1 CHARACTER OUTPUT SUBROUTINE

    00026 E0E3 MIKBUG EQU $E0E3 MIKBUG REENTRY POINT

    00027 *

    00028 1F00 ORG $1F00

    00029 1F00 CE 8008 LDX #PIA

    00030 *

    00031 * CONFIGURE PIA REGISTERS A AND B

    00032 *

    00033 1F03 4F CLR A INIT PIA REG. B

    00034 1F04 A7 01 STA A 1,X POINT 8008 TO DDRA

    00035 1F06 A7 03 STA A 3,X POINT 800A TO DDRB

    00036 1F08 86 FE LDA A #$FE REG.B B7-B1=OUTPUTS, BO=INPUT

    00037 1F0A A7 02 STA A 2,X PUT TO DATA DIR. REG.B

    00038 1F0C 86 7F LDA A #$7F REG.A B7=INPUT, B6-B0=OUTPUTS

    00039 1F0E A7 00 STA A 0,X PUT TO DATA DIR. REG.A

    00040 1F10 86 04 LDA A #4 POINT TO I/O REG.

    00041 1F12 A7 01 STA A 1,X 8009 IS PIA CONTROL REG.A

    00042 1F14 A7 03 STA A 3,X 800B IS PIA CONTROL REG.B

    00043 1F16 86 01 LDA A #1 NOW OUTPUT A MARK SIGNAL TO

    00044 1F18 A7 00 STA A 0,X CLOSE THE TTY CURRENT LOOP

    00045 *

    00046 * WAIT FOR MARK-TO-SPACE TRANSITION ON LINE.

    00047 *

    00048 1F1A A6 02 WAIT LDA A 2,X SAMPLE THE LINE STATE 5 C

    00049 1F1C 26 FC BNE WAIT IF MARK, WAIT FOR SPACE 4 C

    00050 1F1E CE 1EFF LDX #EOBADR ELSE INIT BUFFER POINTER 4 C

    00051 *

    00052 1F21 F6 8008 NEXT LDA B PIA SAMPLE THE TIMER STATE 4 C

    00053 1F24 C4 80 AND B #$80 MASK ALL BUT INPUT BIT 2 C

    00054 1F26 1B ABA MERGE; A=A+B 2 C

  • 8

    ---

    PAGE 002 DISTORTI

    00055 1F27 A7 00 STA A 0,X SAVE SAMPLES IN ONE LOC. 6 C

    00056 1F29 09 DEX 4 CYC

    00057 1F2A 27 0C BEQ DONE 4 CYC

    00058 * VARY THE ARG. BELOW TO ADJUST SAMPLE PERIOD.

    00059 1F2C C6 06 LDA B #6 SETS SAMPLING RATE 2 C

    00060 *

    00061 *WAIT LOOP BELOW IS 10 CPU CYCLES. I WANT ABOUT

    00062 *220 SAMPLES PER BIT (100US SPACING)

    00063 *

    00064 1F2E 5A WLOOP DEC B 2 CYC

    00065 1F2F 27 02 BEQ CONT 4 CYC

    00066 1F31 20 FB BRA WLOOP 4 CYC

    00067 *

    00068 1F33 B6 800A CONT LDA A PIA+2 GET NEXT LOOP SAMPLE 4 C

    00069 1F36 20 E9 BRA NEXT AND KEEP GOING 4 C

    00070 *

    00071 * DUMP THE SAMPLE BUFFER TO THE CONSOLE USING

    00072 * BETWEEN EACH SAMPLE. COPY/PASTE THE

    00073 * DUMP FROM TERA TERM WINDOW TO EXCEL, THEN

    00074 * SELECT THE DATA AND INSERT 2D LINE CHART

    00075 * TO PLOT THE SAMPLE DATA.

    00076 *

    00077 1F38 CE 1EFF DONE LDX #EOBADR INIT BUFFER POINTER

    00078 1F3B A6 00 OUTLP LDA A 0,X GET SAMPLES

    00079 1F3D 36 PSH A

    00080 1F3E 84 01 AND A #1 MASK ALL BUT LSAMP

    00081 1F40 48 ASL A

    00082 1F41 48 ASL A QUADRUPLE IT TO 4

    00083 1F42 8B 30 ADD A #$30 CONVERT TO ASCII

    00084 1F44 B7 1F6B STA A LSAMP

    00085 1F47 32 PUL A

    00086 1F48 84 80 AND A #$80 MASK ALL BUT TSAMP

    00087 1F4A 49 ROL A

    00088 1F4B 49 ROL A PUT IT IN LSB

    00089 1F4C 8B 30 ADD A #$30 CONVERT TO ASCII

    00090 1F4E B7 1F6D STA A TSAMP

    00091 1F51 FF 1F6F STX XTEMP

    00092 1F54 CE 1F69 LDX #OSTRNG

    00093 1F57 BD E07E JSR PDATA1

    00094 1F5A FE 1F6F LDX XTEMP

    00095 1F5D 09 DEX DECREMENT POINTER

    00096 1F5E 26 DB BNE OUTLP IF >0 THEN KEEP DUMPING

    00097 1F60 CE 1F00 LDX #$1F00 SET UP PROG RESTART ADDRESS

    00098 1F63 FF A048 STX RESTRT

    00099 1F66 7E E0E3 JMP MIKBUG AND EXIT

    00100 *

    00101 * DEFINE OUTPUT PRINT STRING

    00102 *

    00103 1F69 0D OSTRNG FCB $0D,$0A

    00104 1F6B 0001 LSAMP RMB 1

    00105 1F6C 2C FCC /,/

    00106 1F6D 0001 TSAMP RMB 1

    00107 1F6E 04 FCB $04 EOT

    00108 1F6F 0002 XTEMP RMB 2 NOT THE SAME AS MIKBUG XTEMP

  • 9

    ---

    PAGE 003 DISTORTI

    00109 *

    00110 A048 ORG $A048 INITIALIZE PROG. COUNTER

    00111 A048 1F00 FDB $1F00

    00112 END

    TOTAL ERRORS 00000

    DISTORTION TESTER V3 JUNE 26 2015

    S00B0000444953544F52544982

    S11E1F00CE80084FA701A70386FEA702867FA7008604A701A7038601A700A642

    S11E1F1B0226FCCE1EFFF68008C4801BA70009270CC6065A270220FBB6800A2E

    S11E1F3620E9CE1EFFA60036840148488B30B71F6B32848049498B30B71F6DE5

    S11D1F51FF1F6FCE1F69BDE07EFE1F6F0926DBCE1F00FFA0487EE0E30D0AB2

    S1041F6C2C44

    S1041F6E046A

    S105A0481F00F3

    S9

  • 10

    APPENDIX C- 60mA Current Loop Interface for Microcomputer

  • 11

    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).