home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR9 / RGBPLD.ZIP / RGBPLD.DOC < prev    next >
Text File  |  1993-03-26  |  9KB  |  162 lines

  1.  
  2. A LOW COST PLD PROGRAMMER
  3.  
  4. This programmer can program the GAL16V8A, GAL16V8B, GAL20V8A and
  5. GAL20V8B from Lattice, SGS and National Semiconductor.  This may seem
  6. limited but it is not because the 16V8 directly replaces the 16R6, 16R6,
  7. 16R4, 16RP8, 16RP6, 16RP4, 16L8, 16H8, 16P8, 10L8, 12L6, 14L4, 16L2,
  8. 10H8, 12H6, 14H4, 16H2, 10P8, 12P6, 14P4 and 16P2 PALs.  The 20V8
  9. directly replaces the 20R6, 20R6, 20R4, 20RP8, 20RP6, 20RP4, 20L8, 20H8,
  10. 20P8, 14L8, 16L6, 18L4, 20L2, 14H8, 16H6, 18H4, 20H2, 14P8, 16P6, 18P4
  11. and 20P2 PALs.  GALs can handle logic that can not be handled by the
  12. standard PALs. GALs unlike standard PALs can be reprogrammed in seconds
  13. making them idea for the developer. You can build this programmer for
  14. only $150.00 far below the $500 - $10,000 that a universal programmer
  15. typically costs.
  16.  
  17. DESIGN AND THEORY OF OPERATION
  18.  
  19. The programmer is made up of two separate modules, an interface board
  20. that resides in a slot in your PC and a main programmer module external
  21. to the PC.  They are connected by a 50 pin ribbon cable.  The same
  22. interface board is also used with a lost cost logic analyzer.  By
  23. keeping things modular you only need to use one PC slot and can connect
  24. either the PLD unit or logic analyzer unit to the interface card as
  25. needed. 
  26.  
  27. The interface board is a very standard two chip parallel interface.  The
  28. 8255 has three 8 bit parallel ports that can be configured by software. 
  29. This provides for a flexible interface.  In normal operation of the
  30. programmer port A and port B will be configure to be output ports and
  31. port C is configured with bit 0 to 3 as outputs and bits 4 to 7 as
  32. inputs.  The second chip is a 74LS682 8 bit comparator.  It is used as
  33. an address decoder for the 8255.  The 74LS682 asserts pin 19 low when
  34. it's P inputs are the same as it's Q inputs.  The eight Q inputs have an
  35. internal 10 K pull up resistor so they will stay high unless forced low. 
  36. The 8255 address is selected with the DIP switch, each switch that is
  37. turned on will pull the corresponding Q input low.  When the address on
  38. the PC bus (the P inputs) matches the address selected by the DIP switch
  39. (Q inputs) a chip select is generated for the 8255.  If it is an I/O
  40. cycle then either IOR* or IOW* will also be asserted and data will be
  41. read from or written to the 8255 register selected by A0 and A1.  The
  42. 8255 base address is specified to the software in the configuration
  43. file. 
  44.  
  45. 50 pin connector P1 is the bridge to the main programmer board.  Each of
  46. the three 8 bit ports from the 8255 are connected to P1.  Of the
  47. remaining 26 lines, 12 are connected to PC ground, 12 to PC +5 volts
  48. supply, 1 to the PC +12 volts and one to -12 volts.  The +/- 12 volt
  49. supplies are not used by the programmer but are available for other
  50. projects. 
  51.  
  52. GALs are TTL level devices, during programming however, they need a
  53. super voltage of either 12.0, 14.5 or 16.5 volts on pin 2 of the GAL. 
  54. U2 in combination with C1, C2, D1 and D2 form a voltage doubler circuit
  55. that takes the 12 Volts from the interface and converts it into about
  56. 22.6 Volts (12 Volts doubled to 24 Volts minus the two diode voltage
  57. drops).  The 22.6 Volt output is feed into adjustable voltage regulator
  58. U1.  The output voltage of U1 is control by the resistance between pin1
  59. and ground.  The maximum output voltage of U1 is adjusted with R8 to be
  60. 16.5 Volts.  The output voltage can be lowered one step by bring signal
  61. VSEL0 high, this turns T2 on and places resistors R6 and R5 in parallel
  62. with R8 and R9, this lowers the resistance between U1 pin1 and ground,
  63. lowering the output voltage.  R5 is adjusted so that the output voltage
  64. is 14.5 Volts.  An additional output voltage is obtained by setting
  65. VSEL1 high to turn on T1.  R4 is adjusted to produce an output of 12.0
  66. Volts. 
  67.  
  68. The super voltage can be enabled to either pin 2 or pin 4 of the ZIF
  69. socket.  (When a 20 pin 16V8 is placed in the socket is is positioned in
  70. the lower portion of the socket so that pin 2 of the chip actually sits
  71. in pin 4 of the socket.) Transistor pairs T3 and T4 form a switch that
  72. enables the super voltage to appear on pin 2 of the ZIF when the signal
  73. into the base of of T3 is high. T5 and T6 form a similiar switch for pin
  74. 4 of the ZIF.
  75.  
  76. The +5 Volt power to the chip being programmed in the ZIF is switched by
  77. the signals VCC22* and VCC24* from U3. U3 also turns on the LED when
  78. either VCC22* or VCC24* are active.
  79.  
  80. Data is read in from the chip being programmed through either PS14
  81. (16V8) or PS15 (20V8). The GAL output is open drain during programming
  82. so it is pulled up through either R10 or R11 as appropriate. The input
  83. signal appears at the interface on PC7.
  84.  
  85. The remaining pins are driven by U4 and U5.  These are 8 bit addressable
  86. latches.  The bit address is placed on A0, A1 and A2 (pins 5,6 and 7). 
  87. The data to be latched is put on pin 3.  When pin 4 is high the data
  88. from pin 3 is placed on the addressed output pin (if a0=0, a1=0 and a2=0
  89. and data=1 then q0=1).  When pin 4 is brought back low the data is
  90. latched. 
  91.  
  92. BUILDING THE PROGRAMMER
  93.  
  94. Before building the programmer get a copy of the software from one
  95. of the sources in the parts list.  You will need the software for
  96. testing the programmer.
  97.  
  98. The interface board is best built on a purchased PC board (see parts
  99. list for details).  If you elect to hand wire on a PC/XT prototype board
  100. use a heavy gauge wire for the +5 volt and ground connections from the
  101. PC bus to P1. 
  102.  
  103. The programmer board is best built on a purchased PC board (see parts
  104. list for details). If you wish to mount the PCB in a case make sure to
  105. solder the LED so that it is higher then the ZIF socket, that way it can
  106. be seen through a hole in the case. You can use sockets for all the ICs
  107. if desired. No other special procedures are needed.
  108.   
  109. The interface board should be tested before hooking up the programmer
  110. board, it will be easier to locate and fix interface problems isolated
  111. from the main board.  Before plugging the interface into the PC
  112. carefully check for shorts and other errors.  Set the I/O address using
  113. the DIP switch.  I've found that 390H is usually free, this corresponds
  114. to A9-OFF, A8-OFF, A7-OFF, A6-ON, A5-ON, A4-OFF, A3-ON (remember ON
  115. corresponds to a low because it grounds the input).  Once set plug in
  116. the board and power up the PC, if it does not boot up normally, power
  117. down and recheck everything.  The configuration file RGBPLD.CFG should
  118. be edited to match the logic programmer.  RGBLOGIC.CFG is a two line
  119. ASCII text file, the first line contains the base I/O address in hex
  120. (i.e.  390), the second line should always have 1.  Any characters after
  121. the numeric value on each line are ignored.  Edit the file to match your
  122. configuration.  Check the voltages at the end of the 50 conductor ribbon
  123. cable for proper power and ground supplys.  Start up the interface test
  124. program RGBINT.  The interface test allows you to read and write the
  125. 8255 registers.  Write an 80 (all values are expressed in hex) to the
  126. CNTRL register, this will program ports A, B and C as output ports. 
  127. Check each bit of the three ports at the end of the cable.  You can
  128. write different values to the ports from the diagnostic program.  If the
  129. interface doesn't respond at all make sure the configuration file and
  130. DIP switch settings match, if they do then check the interface board for
  131. errors.  If everything is working, power down. 
  132.  
  133. Double check the programmer board for shorts or other errors.  Connect the
  134. 50 conductor ribbon cable to the programmer board and power up the PC.  If
  135. the PC does not boot up normally the power supply is probably shorted -
  136. power down and correct the problem. If everything powers up fine, then run the
  137. program RGBSETUP. Run through each of the tests in the menu. F1 will
  138. allow you the adjust the super voltages. If the the voltages are not
  139. present check the section of the board with U1, U2, T1, T2, T3, T4, T5
  140. and T6. F2 and F3 allow you to check the power to the ZIF socket. F4
  141. checks the pullup resistors and the ability to read data from ZIF pins
  142. 14 and 15. F5 will allow you to check the functioning of each active pin
  143. on the ZIF socket - be sure all pins can be set high or low.
  144.  
  145. To use the programmer start the program RGBPLD.  Before placing a chip
  146. in the ZIF socket select the device type using F1 (not having the
  147. correcting device selected could burn out the chip).  The remaining menu
  148. selections should be self explainatory - they allow you to read/write
  149. JEDEC files and load, program and verify GAL devices.  The User
  150. Electronic Signature (UES) for both the main and verify buffer is
  151. displayed in ASCII format.
  152.  
  153. WRAPPING UP
  154.  
  155. That covers the details of a low cost logic programmer.  National
  156. Semiconductor offers a free Logic Compiler called OPAL Jr. Get a copy
  157. and you can start to design your circuits with programmable logic.
  158.  
  159. RESOURCES
  160.  
  161. National Semiconductor (OPAL Jr.) - (408) 721-2092
  162.