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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MICROPROCESSORS 153<br />

mabIe waveforms using simplified direct synthesis techniques. Many <strong>of</strong> these<br />

applications will be detailed in later chapters.<br />

The 6502 requires a single +5-V power supply, making it directly<br />

compatible with TTL logic systems. A 16-bit address bus, 8-bit bidirectional<br />

data bus, and numerous control signals are provided. Incredibly, there<br />

are three unused pins on the package! The on-chip clock oscillator/driver<br />

requires only a TTL inverter, a crystal (or R-C network), and a few passive<br />

components to generate a two-phase nonoverlapping clock. Although the<br />

standard frequency is only 1.0 MHz, a complete machine cycle is executed in<br />

just one clock cycle.<br />

According to the manufacturer's literature, there are no fewer than nine<br />

different package and pin configurations <strong>of</strong> the basic 6502. Two <strong>of</strong> these are<br />

the typical 40-lead dual-in-line package with all features available and the<br />

other seven are smaller and cheaper 28-lead packages with different mixes <strong>of</strong><br />

omitted functions and intended for small configurations. The primary difference<br />

between the two 40-lead versions is that the 6502 has a built-in clock<br />

oscillator and driver, whereas the 6512 requires an external two-phase clock<br />

oscillator and driver. The advantage <strong>of</strong> an external clock is that timing and<br />

waveshapes can be precisely controlled, although the oscillator pins <strong>of</strong> 6502<br />

can also be externally driven. Thus, the 6502 will be the model for further<br />

discussion.<br />

Bus Structure and Timing<br />

Figure 5-1 shows a 6502 read cycle that is about as simple as one can<br />

get. The I-J.Lsec machine cycle is divided into Phase 1, which is the first 500<br />

nsec, and Phase 2, which is the last 500 nsec. Actually, when using the onchip<br />

oscillator, the cycle may not be split exactly 50-50, but the signal<br />

relationships are still valid. During Phase 1, the address bus and read/write<br />

line settle to valid indications, and near the end <strong>of</strong> Phase 2 the microprocessor<br />

reads the data bus. Static read-only devices can actually be<br />

connected to the address and data buses without any other control signals at<br />

all; if they see their address, they drive their data. Approximately 600 nsec is<br />

allowed for memory access, although typically greater than 850 nsec can be<br />

tolerated before malfunction.<br />

I CLOCK CYCLE = I }J sec I<br />

CLOCK ~~;g I ~'''' ~~<br />

.,,"'~."'~ """ . -<br />

READ/WRITE _ _ ~<br />

DATA IN<br />

1. 600 I 100<br />

1?JZ??ZIZ?ZV7~~<br />

Fig. 5-1. 6502 read cycle timing

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

Saved successfully!

Ooh no, something went wrong!