INMC 80 News

  

October–December 1981, Issue 5











Page 29 of 71











If all is well, plug in the PSG chip (taking precautions against static charges), cross your fingers and switch on. Hopefully everything should now work,

Addressing the PSG:

This is very simple – select a register by writing to port 8 and then load it or read from it with port 9.

eg. to load register 7 (PSG output enable) with 244 (tone channels A and B, noise channel A enabled) simply write:

(BASIC)      OUT8,7:0UT9,244

(ASSEMBLER)  LD A,#07
             OUT (8),A
             LD A,#F4
             OUT(9),A

And to read, say register 7:

(BASIC)      OUT8,7:PRINT INP(9)

(ASSEMBLER)  LD A, #07
             OUT (8),A
             IN A,(9)
             :Contents now in A

Further ideas:

If you anticipate using several PSGs in your system, try using a 2708 EPROM to decode the address bus and control signals. The eight outputs could be paired to provide the BC1 and BDIR signals for four PSGs. Optional simultaneous access to all of them would be possible (in the write mode anyway) and the hardware would be much easier and cheaper to build.

Suggested readings:

a) The data manual for the PSG from the retailers

b) BYTE, July 1979

c) Personal Computer World, October 1989

d) Practical Electronics, September 1980

e) TTL Cookbook, D. Lancaster

FIGURE 2

NASIO CIRCUITRY FOR SEVERAL PORTS ATTACHED TO BUS


This is an OCR’d version of the scanned page and likely contains recognition errors.











Page 29 of 71