22.09.2015 Views

of Microprocessors

Musical-Applications-of-Microprocessors-2ed-Chamberlin-H-1987

Musical-Applications-of-Microprocessors-2ed-Chamberlin-H-1987

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

164 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

Enable, which is equivalent to the 6502's Phase 2. The frequency <strong>of</strong> this<br />

signal is one-tenth the clock frequency and has a 60% low, 40% high duty<br />

cycle. Any normal 68000 bus cycle can be converted into a synchronous 6800<br />

cycle by driving the Valid Peripheral Address (VPA) line low before the<br />

beginning <strong>of</strong> State 4. This would normally be done by a decoder recognizing<br />

the address <strong>of</strong> an I/O chip on the address lines. The 68000 will then wait<br />

until Enable goes low, drive Valid Memory Address low, and then transfer<br />

data when Enable goes high and low again. Since Enable is a uniform<br />

frequency rectangular wave and 68000 bus cycles can start at any time, the<br />

amount <strong>of</strong> time required to execute a 6800-compatible cycle can vary from 10<br />

clocks to 18 clocks. One could in fact make all bus cycles 6800-compatible<br />

by grounding the VPA line, but then system speed would be less than half <strong>of</strong><br />

its potential.<br />

Severa] other bus control signals are available for more complex<br />

systems. One <strong>of</strong> these is Bus Error, which will abort a bus cycle in progress<br />

and generate an interrupt if activated. In a small system, its main use is to<br />

flag attempted access <strong>of</strong> nonexistent memory as an error condition and return<br />

to the operating system. In a large system using virtual memory, this signal<br />

would come from the memory manager and would indicate that the area <strong>of</strong><br />

memory just addressed is on disk and needs to be swapped in. In such cases,<br />

bus cycles can actually be retried by proper use <strong>of</strong> the Halt signal. A simple<br />

system would just tie Halt and Reset together and use the result as the system<br />

reset signal.<br />

Three signals are used for direct memory access (DMA) applications.<br />

These are Bus Request, Bus Grant, and Bus Grant Acknowledge. They<br />

operate in a complex two-phase handshake sequence that will not be detailed<br />

here. The 68000 is quite efficient in releasing the bus for DMA with as little<br />

as one clock cycle <strong>of</strong> overhead involved. As is traditional with microprocessors,<br />

once the 68000 has released control <strong>of</strong> the bus (which includes<br />

data, adddress, and most <strong>of</strong> the controls), it is the responsibility <strong>of</strong> the DMA<br />

device to generate all <strong>of</strong> the timing signals needed for data transfers.<br />

Interrupts<br />

All large computer systems have elaborate interrupt structures and the<br />

68000 is no exception. Interrupts, which are called exceptions by Motorola,<br />

can come from a variety <strong>of</strong> internal sources such as zero divide, external<br />

hardware errors such as Bus Error, and from I/O devices. Every possible<br />

interrupt source is assigned to a two-word (4-byte) vector in memory. These<br />

vectors are stored at fixed addresses in memory starting at location zero and<br />

extending up to 1023 for 255 possible interrupt sources. A summary <strong>of</strong> these<br />

vectors is shown in Table 5-2. Each vectot, except number zero, is simply<br />

the address <strong>of</strong> the interrupt service subroutine.<br />

When an interrupt occurs, the processor status and a return address are<br />

pushed onto the supervisor stack. Next, the corresponding vector is read to

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!