home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 1 / QRZ Ham Radio Callsign Database - December 1993.iso / ucsd / packet / misc / dsy_rom.txt < prev    next >
Encoding:
Internet Message Format  |  1989-11-28  |  8.3 KB

  1. Date: Tue, 28 Nov 89 18:31:13 -0800
  2. From: Marc T. Kaufman <kaufman@Neon.Stanford.EDU>
  3. Message-Id: <8911290231.AA25951@Neon.Stanford.EDU>
  4. Subject: Re: TAPR 9600 RAdio/Modems???
  5.  
  6. Enclosed is a new ROM for you to try with the 56KB modem, if you are
  7. interested. (actually, it is a rom description and a program to compile
  8. the ROM itself).
  9.  
  10. The waveshape used here is a band-limited, continuous-phase, pulse of
  11. length L = 2T.  Each 16 bit run has the last half of the previous pulse,
  12. and the first half of the current pulse.  The total bandwidth should be
  13. on the order of (99% = 2.2 x b), which is OK since you would expect sidebands
  14. at +/- 1 x b (for a bandwidth of 2 x b) anyway, unless you are using TFM with
  15. a fairly long spread.
  16.  
  17. Anyway, try it if you have time, and tell me how it compares to Heatherington's
  18. original.
  19.  
  20. Marc Kaufman (kaufman@Neon.stanford.edu)
  21.  
  22. ***** program to make the rom *****
  23.  
  24. /* Program to build ROMs for Heatherington 56Kb modem
  25.  *
  26.  * Written by Marc Kaufman, WB6ECE
  27.  *            6 September 1987
  28.  *
  29.  *  usage:  mkrom < Romdatafile > binaryromfile
  30.  */
  31. #include <stdio.h>
  32.  
  33. #define ROMSZ  1024
  34. #define LINESZ 100
  35. #define TRUE   1
  36. #define FALSE  0
  37.  
  38. char    rom[ROMSZ];
  39. char    line[LINESZ];
  40.  
  41. main() {
  42.     int addr, j;
  43.     int mode, innum, minus;
  44.     char *p, c;
  45.  
  46.     for (addr = 0; addr < ROMSZ; addr++)
  47.         rom[addr] = 0377;
  48.  
  49.     while (fgets(line, LINESZ, stdin) != NULL) {
  50.  
  51.         switch (line[0]) {
  52.  
  53.         case '.':    /* waveshape data */
  54.  
  55.             mode = 0;
  56.             sscanf(&line[1], "%d", &addr);
  57.             break;
  58.  
  59.         case '=':    /* state table data */
  60.             mode = 1;
  61.             sscanf(&line[1], "%d", &addr);
  62.             break;
  63.  
  64.         case '/':    /* comments */
  65.         case '\n':
  66.             break;
  67.  
  68.         default:    /* line of data */
  69.             p = line;
  70.             innum = FALSE;
  71.             minus = FALSE;
  72.             j = 0;
  73.             while (c = *p++) {
  74.                 if (c == '-') {
  75.                     minus = TRUE;
  76.                 } else if (c >= '0' && c <= '9') {
  77.                     innum = TRUE;
  78.                     if (mode == 0)
  79.                         j = 10*j + c - '0';
  80.                     else
  81.                         j = 4*j + c - '0';
  82.                 }
  83.                 else
  84.                     if (innum) {
  85.                         if (mode == 0)
  86.                             if (minus)
  87.                                 j = 128 - j;
  88.                             else
  89.                                 j = 128 + j;
  90.                         rom[addr++] = j;
  91.                         innum = FALSE;
  92.                         minus = FALSE;
  93.                         j = 0;
  94.                     }
  95.             }
  96.             break;
  97.         }
  98.     }
  99.  
  100.     write(fileno(stdout), rom, ROMSZ);
  101. }
  102.  
  103. ***** data for program *****
  104.  
  105. / ROM data for Heatherington 56Kb modem
  106. / Developed by Marc Kaufman, WB6ECE
  107. /              6 September 1987
  108.  
  109. / data portion.  Each waveform segment is 1/2 of an L=2 CPM wave, so it is
  110. /                the first half of the wave we want, plus the last half of
  111. /                the previous wave.  The suffix 'S' or 'O' indicates whether
  112. /                the current bit is going in the Same direction (in terms of
  113. /                phasor rotation) or is Opposed (phasor reverses direction).
  114. /                The NRZI algorithm says that if the current bit is '1', go
  115. /                the same way (the result will be another FM pulse of the
  116. /                same polarity as the last), and if the bit is a '0', go the
  117. /                other way (the result will be an FM pulse of the opposite
  118. /                polarity to the last).
  119. / Q data -
  120. .512
  121. / state 0, clock 0, (0 -> 1)S
  122.  -87  -77  -66  -55  -43  -31  -20   -8    4   15   27   39   51   62   73   84
  123. / state 0, clock 1, (1 -> 0)S
  124.   94  102  109  116  120  124  126  127  127  127  124  121  117  111  104   96
  125. / state 0, clock 2, (0 -> -1)S
  126.   86   76   65   54   42   30   19    7   -5  -16  -28  -40  -52  -63  -74  -85
  127. / state 0, clock 3, (-1 -> 0)S
  128.  -95 -103 -110 -117 -121 -125 -127 -128 -128 -128 -125 -122 -118 -112 -105  -97
  129. / state 1, clock 0, (0 -> -1)S
  130.   86   76   65   54   42   30   19    7   -5  -16  -28  -40  -52  -63  -74  -85
  131. / state 1, clock 1, (-1 -> 0)S
  132.  -95 -103 -110 -117 -121 -125 -127 -128 -128 -128 -125 -122 -118 -112 -105  -97
  133. / state 1, clock 2, (0 -> 1)S
  134.  -87  -77  -66  -55  -43  -31  -20   -8    4   15   27   39   51   62   73   84
  135. / state 1, clock 3, (1 -> 0)S
  136.   94  102  109  116  120  124  126  127  127  127  124  121  117  111  104   96
  137. / state 2, clock 0, (0 -> 1)O
  138.   84   71   58   45   34   25   18   15   15   18   25   34   45   58   71   84
  139. / state 2, clock 1, (1 -> 0)O
  140.   96  106  114  119  123  125  126  127  127  126  125  123  119  114  106   96
  141. / state 2, clock 2, (0 -> 1)O
  142.   84   71   58   45   34   25   18   15   15   18   25   34   45   58   71   84
  143. / state 2, clock 3, (1 -> 0)O
  144.   96  106  114  119  123  125  126  127  127  126  125  123  119  114  106   96
  145. / state 3, clock 0, (0 -> -1)O
  146.  -85  -72  -59  -46  -35  -26  -19  -16  -16  -19  -26  -35  -46  -59  -72  -85
  147. / state 3, clock 1, (-1 -> 0)O
  148.  -97 -107 -115 -120 -124 -126 -127 -128 -128 -127 -126 -124 -120 -115 -107  -97
  149. / state 3, clock 2, (0 -> -1)O
  150.  -85  -72  -59  -46  -35  -26  -19  -16  -16  -19  -26  -35  -46  -59  -72  -85
  151. / state 3, clock 3, (-1 -> 0)O
  152.  -97 -107 -115 -120 -124 -126 -127 -128 -128 -127 -126 -124 -120 -115 -107  -97
  153.  
  154. / I data -  just like Q data, but permuted by 1 clock (quadrature)
  155. .768
  156. / state 0, clock 0, (1 -> 0)S
  157.   94  102  109  116  120  124  126  127  127  127  124  121  117  111  104   96
  158. / state 0, clock 1, (0 -> -1)S
  159.   86   76   65   54   42   30   19    7   -5  -16  -28  -40  -52  -63  -74  -85
  160. / state 0, clock 2, (-1 -> 0)S
  161.  -95 -103 -110 -117 -121 -125 -127 -128 -128 -128 -125 -122 -118 -112 -105  -97
  162. / state 0, clock 3, (0 -> 1)S
  163.  -87  -77  -66  -55  -43  -31  -20   -8    4   15   27   39   51   62   73   84
  164. / state 1, clock 0, (-1 -> 0)S
  165.  -95 -103 -110 -117 -121 -125 -127 -128 -128 -128 -125 -122 -118 -112 -105  -97
  166. / state 1, clock 1, (0 -> 1)S
  167.  -87  -77  -66  -55  -43  -31  -20   -8    4   15   27   39   51   62   73   84
  168. / state 1, clock 2, (1 -> 0)S
  169.   94  102  109  116  120  124  126  127  127  127  124  121  117  111  104   96
  170. / state 1, clock 3, (0 -> -1)S
  171.   86   76   65   54   42   30   19    7   -5  -16  -28  -40  -52  -63  -74  -85
  172. / state 2, clock 0, (1 -> 0)O
  173.   96  106  114  119  123  125  126  127  127  126  125  123  119  114  106   96
  174. / state 2, clock 1, (0 -> 1)O
  175.   84   71   58   45   34   25   18   15   15   18   25   34   45   58   71   84
  176. / state 2, clock 2, (1 -> 0)O
  177.   96  106  114  119  123  125  126  127  127  126  125  123  119  114  106   96
  178. / state 2, clock 3, (0 -> 1)O
  179.   84   71   58   45   34   25   18   15   15   18   25   34   45   58   71   84
  180. / state 3, clock 0, (-1 -> 0)O
  181.  -97 -107 -115 -120 -124 -126 -127 -128 -128 -127 -126 -124 -120 -115 -107  -97
  182. / state 3, clock 1, (0 -> -1)O
  183.  -85  -72  -59  -46  -35  -26  -19  -16  -16  -19  -26  -35  -46  -59  -72  -85
  184. / state 3, clock 2, (-1 -> 0)O
  185.  -97 -107 -115 -120 -124 -126 -127 -128 -128 -127 -126 -124 -120 -115 -107  -97
  186. / state 3, clock 3, (0 -> -1)O
  187.  -85  -72  -59  -46  -35  -26  -19  -16  -16  -19  -26  -35  -46  -59  -72  -85
  188.  
  189. / State Change portion
  190. /  After each 16 waveform samples (64 clocks), A state lookup is performed
  191. /  to get the correct phasor rotation for the next bit.  If the next bit
  192. /  is a '1', we want to rotate in the same direction.  If the next bit is
  193. /  a '0', we want to rotate in the opposite direction.  I and Q states
  194. /  are independent.  The state entry is 4 bits of the form 'iiqq', where
  195. /  'ii' is the next I state and 'qq' is the next Q state.  The basic pattern
  196. /  (for Q states only) is:
  197. /                             CURRENT STATE
  198. /                            0    1    2    3
  199. /                         ----------------------
  200. /  Data bit = 0: Clock 0 |   2    3    2    3
  201. /                Clock 1 |   2    3    2    3
  202. /                Clock 2 |   3    2    2    3
  203. /                Clock 3 |   3    2    2    3
  204. /
  205. /  Data bit = 1: Clock 0 |   0    1    0    1
  206. /                Clock 1 |   0    1    0    1
  207. /                Clock 2 |   0    1    1    0
  208. /                Clock 3 |   0    1    1    0
  209. /               
  210. /  The I state table is identical, but shifted by 1 clock period.
  211.  
  212. =256
  213. /  Data bit = 0, Clock 0
  214.   22  23  22  23  32  33  32  33  22  23  22  23  32  33  32  33
  215. /  Data bit = 0, Clock 1
  216.   32  33  32  33  22  23  22  23  22  23  22  23  32  33  32  33
  217. /  Data bit = 0, Clock 2
  218.   33  32  32  33  23  22  22  23  23  22  22  23  33  32  32  33
  219. /  Data bit = 0, Clock 3
  220.   23  22  22  23  33  32  32  33  23  22  22  23  33  32  32  33
  221.  
  222. =320
  223. /  Data bit = 1, Clock 0
  224.   00  01  00  01  10  11  10  11  00  01  00  01  10  11  10  11
  225. /  Data bit = 1, Clock 1
  226.   00  01  00  01  10  11  10  11  10  11  10  11  00  01  00  01
  227. /  Data bit = 1, Clock 2
  228.   00  01  01  00  10  11  11  10  10  11  11  10  00  01  01  00
  229. /  Data bit = 1, Clock 3
  230.   00  01  01  00  10  11  11  10  00  01  01  00  10  11  11  10
  231.  
  232. //////// end of transmission ////////
  233.