home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1994 February / psl_9403.zip / psl_9403 / DOS / UT_SYSTM / LOGV20.ZIP / README.DOC < prev   
Text File  |  1993-12-01  |  13KB  |  264 lines

  1. A $20 LOGIC ANALYZER
  2.  
  3. Yes that is right if you own a PC compatible computer that has a printer
  4. port, you can have a logic analyzer for $20 (or less depending on what
  5. parts you have lying around).  Our $20 logic analyzer features:
  6.  
  7. - 5 data channels.
  8.  
  9. - 8 K byte data buffer.
  10.  
  11. - 5 bit trigger with don't care states.
  12.  
  13. - maximum sample rate up to several hundred Khz.
  14.  
  15. - 5 sample rate selections.
  16.  
  17. - easy to used PC based software.
  18.  
  19. - timing and state display modes.
  20.  
  21. - can be used with a notebook PC as a portable logic analyzer.
  22.  
  23. Of course these features are not comparable to the latest offerings
  24. from HP, but for thousands of dollars less you can own a very useful
  25. tool.  The maximum sample is not fast enough to use on a typical
  26. microprocessor, but it is fast enough to trouble shoot most I/O control
  27. signals, TTL level serial and devices such as EPROM or GAL programmers. 
  28.  
  29. Building the $20 Logic Analyzer
  30.  
  31. The only piece that needs to be built is an easy to make probe assembly. 
  32. It requires only eight components as listed in the parts list.  The
  33. probe assembly is used to connect the five logic analyzer channels and a
  34. ground path to the circuit being tested.  The assembly is detailed in
  35. figure 1.  Figure 2 shows the connection list and figure 3 shows the pin
  36. out of the male DB-25 connector as view from the rear (solder cup side). 
  37. Although only six conductors are actually used having a nine conductor
  38. ribbon cable provides for a grounded conductor between each of the
  39. signal channels.  This makes for a shield between signals and prevents
  40. crosstalk between channels.  The three conductors that do not attach to
  41. mini clips can be cut at the point where the ribbon cable is broken out. 
  42. Once the signals are separated there is no longer any concern about
  43. crosstalk.  The 9 conductor ribbon cable can be made from any wider
  44. ribbon cable by stripping some of the conductors off.  The 6 clips that
  45. are connected at the end of the cable should be labeled as shown in
  46. figures 1 and 2.  Once the assembly is complete, it is plugged into the
  47. PC's parallel printer port for use.  The software can be configured to
  48. use either LPT1 or LPT2. 
  49.  
  50. Setting Up the $20 Logic Analyzer Software
  51.  
  52. The $20 Logic Analyzer is very easy to setup.  Copy the program
  53. LOGIC$20.EXE onto your disk.  Then start the program by typing LOGIC$20
  54. and then Enter at the DOS prompt.  The first time it is run the program
  55. will indicate that it could not find the configuration file LOGIC$20.CFG
  56. - this is OK.  As prompted press any key for the main menu to appear. 
  57. Select option F8 - Calibrate from the main menu.  This will create a
  58. proper configuration file for the next time the program is run.  You
  59. will be asked which printer port you wish to use.  Enter 1 or 2
  60. corresponding to either LPT1 or LPT2.  The program will take a second to
  61. determine the maximum sample rate that can be used on that PC.  This
  62. information will automatically be stored in the configuration file.  The
  63. calibration process will need repeated for each different PC the $20
  64. Logic Analyzer is installed on.  That completes the setup. 
  65.  
  66. Using the $20 Logic Analyzer
  67.  
  68. The $20 Logic Analyzer is easy to use.  Start the program as above. 
  69. Connect the mini clip labeled ground to the ground of the circuit being
  70. tested.  Connect the other mini clips to the points of interest in the
  71. circuit.  CAUTION - do NOT connect the clips to any signals that are
  72. outside of the 0 to 5 Volt TTL range, it will damage your printer port. 
  73. The programs main menu will appears as in Figure 4.  Use option F1 to
  74. select the trigger condition.  Only bits 0 to 4 are valid, bits 5 to 7
  75. are ignored.  The trigger for each bit can be selected to be a 0, a 1 or
  76. an X.  An X at a given channel position means that you do not care about
  77. the state of that channel as part of the trigger condition.  All Xs
  78. means that a trigger will occur immediately.  A trigger of XXX01XX1
  79. means that a trigger will occur when channel 5 is 0 (TTL low), channel 4
  80. is 1 (TTL high) and channel 0 is 1.  Data would still be acquired on
  81. channels 1 and 2, but it would be ignored when checking for a trigger
  82. condition.  Option F3 allows you to select the sample rate, the options
  83. are the maximum sample (as determined from the calibration routine), and
  84. one half, one quarter, one eighth and one sixteenth of the maximum
  85. sample rate.  The choices are expressed as both the sample rate in Khz
  86. and the sample period in microseconds.  Option F4 starts the data
  87. acquisition, data will be acquired until 4096 samples after a trigger
  88. condition occurs or until a key is pressed.  Option F5 will show the
  89. acquired data in STATE format.  For each sample the state display shows
  90. the clock cycle number relative to the trigger point.  The trigger point
  91. is considered clock cycle zero, the negative numbers are the clock
  92. cycles before the trigger and positive are after the trigger.  The next
  93. number is the time in micro seconds relative to the trigger.  Then the
  94. data is displayed first in hex and then in binary channel 0 the least
  95. significant bit).  You can move forward or backward through the state
  96. display by pressing Pg Up, Pg Dn, Home, End and the numeric pad 5 key
  97. (this may only work with Num Lock active depending on your keyboard). 
  98. Pg Up and Pg Dn will move backward or forward one page at a time.  Home
  99. will jump to the first data acquired and End to the last data acquired. 
  100. The 5 key will return you back to the trigger point.  A special feature
  101. is the search capabilities, by pressing S you will see the search menu. 
  102. Specify the search pattern in the same manner as selecting a trigger
  103. condition (1,0 and X), press return when finished.  Select F (forward
  104. search) or R (reverse search).  The program will search for data that
  105. matches your condition and display that screen of data.  This is a very
  106. powerful feature because of the rather deep 8K data buffer (many
  107. expensive logic analyzers have only 2K deep buffers).  Press ESC to exit
  108. the state display.  Press F6 to enter the timing display (Note - this
  109. requires a CGA or compatible display (EGA or VGA)).  The data will be
  110. displayed in timing diagram format.  There is a cursor at the trigger
  111. point and the state information from the cursor position is displayed at
  112. the top of the screen.  The ESC, Pg Up, Pg Dn, Home, End, numeric 5 key
  113. and the search option work the same way as with the state display.  In
  114. addition the left and right arrow keys can move the cursor back and
  115. forth through the data to display the state information for any point on
  116. display.  F7 the file option on the menu allows you the save and restore
  117. data and setup information (trigger word, clock rate etc.).  You can use
  118. this to save data and view it at another time.  F8 is the calibration
  119. mode described above and F9 gives program information.  Use option F10
  120. to exit the program. 
  121.  
  122. How the $20 Logic Analyzer Works
  123.  
  124. On most system designs there is a trade off between performing various
  125. functions in hardware or using software.  Typically the software route
  126. has a lower parts cost at the expense of lower performance.  For the 20$
  127. logic analyzer the data acquisition is done in software with the
  128. assistance of the standard hardware that is available on all PCs.  This
  129. is why the cost is so low.  The only special hardware needed is the
  130. inexpensive probe assembly.  The probe assembly plugs into the parallel
  131. printer port of your PC, either LPT1 or LPT2 can be used. 
  132.  
  133. The standard PC printer port has 5 input pins, these of course become
  134. the five channels on the $20 Logic Analyzer.  The 5 inputs are all
  135. present on an input port at either 379H (LPT1) or 279H (LPT2) so they
  136. can be read simultaneously by the logic analyzer software.  The software
  137. can check for a match with the trigger condition and then stop data
  138. acquisition when appropriate.  An 8 K byte block of PC memory forms a
  139. buffer for the data.
  140.  
  141. The sample rate time base is generated by stealing the PCs time of day
  142. clock hardware during data acquisition. To understand how this works we
  143. need to take a look back at the original PC design.
  144.  
  145. Since the