home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / documentation / z80card_1 / Z80card / document / Help next >
Encoding:
Text File  |  1994-04-11  |  4.9 KB  |  111 lines

  1. Z80 Processor Expansion Card
  2. (c) Adrian Lees 1994
  3. v1.01
  4.  
  5. Construction
  6. ------------
  7.  
  8. The complete circuit will fit on a standard expansion card (100mm x 160mm)
  9. without any trouble. The prototype was constructed using veroboard,
  10. although on reflection tri-pad would probably have been more suitable
  11. as most of the wiring is essentially point-to-point.
  12.  
  13. The use of IC sockets is strongly recommended !
  14.  
  15. I used 74LS series logic for my card but it is better to use 74HC or 74HCT
  16. series. The only problem I foresee with using 74HC is that 4k7 pull-up
  17. resistors wherever a TTL device drives an HC device, ie. notably the
  18. outputs from the processor, unless of course you can obtain a CMOS variant
  19. of the Z80 processor. The static RAM chip used, 62256, is CMOS anyway,
  20. although I'm not sure whether the outputs are CMOS or TTL levels.
  21.  
  22.  
  23. Testing
  24. -------
  25.  
  26. I would suggest that you wire-up the entire circuit but do not fit the ICs
  27. initially. Starting simple is always a good idea. I recommend following the
  28. stages listed below as a guideline during testing:
  29.  
  30. 1. Initially connect the board with none of the ICs installed.
  31.    The computer should behave normally. If not then check your wiring !
  32.  
  33. 2. Fit _only_ the 138 address decoder and the 245 which is responsible
  34.    for provide the expansion card ID byte. (the one which is connected
  35.    to the DIP switches !)
  36.  
  37.    Set the DIP switches to an ID (not zero !) that is not used in your
  38.    machine. *Podules will provide this information.
  39.    (Incidentally, the more binary 1's you have in the ID the lower will
  40.    be the current consumed by the card, although the difference is
  41.    fairly negligible, especially if you are using 74LS logic ! Either way,
  42.    you might aswell use 15 if you don't have one of these already.)
  43.  
  44.    The card should now register itself with RISC OS, and *Podules will
  45.    display an identification of the form 'Simple expansion card n'
  46.  
  47. NOTE: TO PERFORM THE FOLLOWING TESTS YOU MUST TIE THE BUSACK* LINE
  48. LOW TO ENSURE THAT THE ARCHIMEDES CAN ACCESS THE Z80'S BUS.
  49.  
  50. 3. Add the 374 latch chip and check the output produced by writing to
  51.    the latch. It is best to write the values 1,2,4,8,16... and test all
  52.    outputs for each value written so that you can ascertain that none
  53.    of the lines have been crossed-over or shorted together.
  54.  
  55. 4. Add the 245 data buffer between the Archimedes and the Z80's RAM and
  56.    perform a series of read operations from the RAM, setting each input
  57.    to the buffer low in turn. (Assuming that the other inputs float
  58.    high) 
  59.  
  60. 5. Then check the 175 latch in the same way that the 374 was tested. The
  61.    outputs from this latch should enter the following states when the
  62.    Archimedes performs a Reset operation, ie. the reset is pressed or
  63.    power-on occurs.
  64.  
  65.         BUSREQ*        0        Bus is requested, thus disabling the Z80
  66.                                 processor because there will be no
  67.                                 meaningful code present in the memory.
  68.         RSTB           0        Reset operation is not in progress.
  69.         IRQEN*         1        Interrupts are disabled because an
  70.                                 interrupt handler may not have been
  71.                                 installed in the Archimedes at this
  72.                                 stage.
  73.  
  74. 6. Test that the processor is executing instructions by downloading
  75.    a simple Z80 routine into address 0, for example the program
  76.    supplied which adds two numbers together in two addresses,
  77.    returning a result in a third address which the Archimedes can
  78.    subsequently verify.
  79.  
  80. 7. Testing the IRQ logic:
  81.  
  82.    Download a program that contains and IN/OUT operation and commence
  83.    execution. When this instruction is reached, the IORQ* output from
  84.    the Z80 will pulse low, triggering the IRQ flip-flop and the output
  85.    Q* from the appropriate half of the 74 chip will be taken low.
  86.    Check this and set IRQEN* high (the initial state). The PIRQ*
  87.    line to the expansion card interface should be pulled-high
  88.    by the Archimedes' internal pull-up. When IRQEN* is forced low,
  89.    by programming the 'Set status' register at offset 4, the
  90.    PIRQ* should be pulled-low and the PIRQ input to the Expansion Card
  91.    ID Buffer (bit 0) will be high.
  92.  
  93. 8. Clearing the interrupt request.
  94.  
  95.    Reading from offset 8 will reset the 74 flip-flop, taking 
  96.    the Q* output high, the PIRQ output low and the PIRQ* input
  97.    to the expansion card interface will be pulled high.
  98.  
  99. 9. Run the AutoTest program which will randomly write random data
  100.    into the Z80's memory and retrieve it, checking its validity.
  101.    If any discrepancies are detected then the address and the value
  102.    written are displayed on the screen. Hopefully you will
  103.    simply see a blank screen. Leave the program running for a few
  104.    minutes (perhaps 10 - 15) and if no errors are reported then
  105.    you can assume that the memory is working correctly.
  106.  
  107. 10.Congratulations ! If you have got this far and all of the above
  108.    tests have passed successfully then your card should be
  109.    working perfectly.
  110.  
  111.