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.

ORGAN KEYBOARD INTERFACE<br />

305<br />

r---------<br />

I<br />

I<br />

I<br />

I<br />

I<br />

TIMER<br />

INTERRUPT<br />

(EVERY FIFTHl<br />

Fig. 9-7. Overall program flow<br />

action by the host system. If so, the event is left in the queue and the<br />

program continues. Otherwise, the event is removed from the queue, put<br />

into the output ports, and deleted from the queue.<br />

Key scanning is next. Each key is tested to determine if it is contacting<br />

the upper bus and had been previously as well. If not, an exit from the<br />

scanning loop is taken to process the active key. Key-down processing looks<br />

at the previous "state" <strong>of</strong> the key and decides whether to start or continue a<br />

velocity count, queue an event, or just do nothing. After key-down process-

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

Saved successfully!

Ooh no, something went wrong!