home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / develop / galer / galer_english / examples / counter.pld < prev    next >
Encoding:
Text File  |  1995-02-27  |  1.0 KB  |  54 lines

  1. GAL16V8            4-Bit-Counter  first line: used GAL
  2. Counter                       second line: any text (max. 8 char.)
  3.  
  4.  
  5. Clock D0    D1    D2    D3    Set   Clear NC    NC   GND
  6. /OE   NC    NC    NC    NC    Q3    Q2    Q1    Q0   VCC
  7.  
  8.  
  9.  
  10.  
  11.  
  12. Q0.R =   /Clear *  Set *  D0
  13.        + /Clear * /Set * /Q0
  14.  
  15.  
  16. Q1.R =   /Clear *  Set *  D1
  17.        + /Clear * /Set * /Q1 *  Q0
  18.        + /Clear * /Set *  Q1 * /Q0
  19.  
  20.  
  21. Q2.R =   /Clear *  Set *  D2
  22.        + /Clear * /Set *  Q2 * /Q1
  23.        + /Clear * /Set *  Q2 * /Q0
  24.        + /Clear * /Set * /Q2 *  Q1 *  Q0
  25.  
  26.  
  27. Q3.R =   /Clear *  Set *  D3
  28.        + /Clear * /Set *  Q3 * /Q2
  29.        + /Clear * /Set *  Q3 * /Q1
  30.        + /Clear * /Set *  Q3 * /Q0
  31.        + /Clear * /Set * /Q3 *  Q2 *  Q1 *  Q0
  32.  
  33.  
  34.  
  35.  
  36.  
  37. DESCRIPTION
  38.  
  39. this is a 4-Bit-Counter
  40.  
  41. registered outputs are signed with the postfix .R
  42.  
  43.  
  44.  
  45.  Pin 'Set' HIGH while clock signal (LOW-HIGH) at pin 'Clock':
  46.     load Q0-Q3 with state of D0-D3
  47.  
  48.  Pin 'Clear' HIGH while clock signal:
  49.     Q0-Q3 are cleared
  50.  
  51.  Clock signal while pins 'Set' and 'Clear' are LOW:
  52.     increment counter
  53.  
  54.