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.

342 MUSICAL ApPLICATIONS OF MICROPROCESSORS<br />

and Y deflection <strong>of</strong> the beam. Unfortunately, home TV sets or standard video<br />

monitors do not fall into this category. Oscilloscopes, however, do provide<br />

random positioning capability, but the screen size is fairly small. A large<br />

screen random deflection display monitor is currently a specialized, expensive<br />

device. Another problem is that without an adjunct character generator<br />

circuit and small-angle deflection circuit the amount <strong>of</strong> text that can be<br />

displayed is limited.<br />

A Simple Vector Display<br />

Perhaps the best way to become acquainted with the characteristics <strong>of</strong><br />

vector displays is to describe a simple unit that is easily built, is inexpensive,<br />

and gives surprisingly good performance. It may be interfaced to any computer<br />

that has two 8-bit output ports. The output consists <strong>of</strong> X, Y, and Z<br />

(beam on-<strong>of</strong>f control) voltages that can use any oscilloscope having dccoupled<br />

amplifiers as a display monitor. The resolution is 256x 256 raster<br />

units, but the quality is equivalent to much larger dot-type displays.<br />

One fact <strong>of</strong> life is that the image on the tube must be rewritten<br />

continuously. This is called refreshing the display and is necessary to prevent<br />

it from fading away within a fraction <strong>of</strong> a second. For most display monitors,<br />

the image must be refreshed at least 40 times/sec to avoid flicker. Maximum<br />

image complexity is directly proportional to the number <strong>of</strong> lines that may be<br />

drawn in one refresh interval. Very detailed, complex drawings are possible,<br />

however, if some flicker is allowed. It is also sometimes possible to obtain an<br />

oscilloscope with a long-persistence phosphor in which the image does not fade<br />

so quickly. These are usually yellow or orange in color as opposed to green<br />

and are commonly used in medical applications. The display to be described<br />

requires about 50 p,sec to draw a line. Thus, about 500 lines may be drawn in<br />

the 25-msec interval allowed for a 40-Hz refresh rate.<br />

Two 8-bit output ports are used to control the display. Port one is used<br />

for specifying X and Y coordinates. The coordinates are unsigned numbers in<br />

the range <strong>of</strong> 0 to 255 wi th zero corresponding to the bottom and left edges <strong>of</strong><br />

the screen. Only 4 bits <strong>of</strong> the other port are used. The "save X" bit when a<br />

logic one causes the content <strong>of</strong> port one to be interpreted as an X coordinate<br />

and stored in an internal register. The "move X" bit causes the previously<br />

saved X to be sent to the X DAC, which then immediately moves the CRT<br />

beam to the new X position. "Move Y" immediately transfers port 1 to the Y<br />

DAC and moves the beam. The fourth bit is called "draw," which turns the<br />

beam on for 50 p,sec and sets up for controlled movement so that straight lines<br />

are drawn. For proper operation <strong>of</strong> draw, move X and move Y should be set<br />

simultaneously with draw.<br />

A typical sequence for drawing a line between two arbitrary endpoints,<br />

Xl,Yl and X2,Y2 would be as follows:<br />

1. Initially port 2 (the control port) is zeros.

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

Saved successfully!

Ooh no, something went wrong!