Mikroelektronika MIKROE-742 데이터 시트

다운로드
페이지 532
while (PINB.B6 <> 0) do nop; // Wait for but-
ton to be released
end;
if (PINB.B5 <> 0) then
// If PORTB.5 is pressed play Tone3
begin
Tone3();                   
while (PINB.B5 <> 0) do nop; // Wait for button to be released
end;
if (PINB.B4 <> 0) then
// If PORTB.4 is pressed play Melody2
begin
Melody2();              
while (PINB.B4 <> 0) do nop; // Wait for button to be released
end;
if (PINB.B3 <> 0) then
// If PORTB.3 is pressed play Melody
begin
Melody();          
while (PINB.B3 <> 0) do nop ; // Wait for button to be
released
end;
end;
end.
HW Connection
Example of Sound Library sonnection
373
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6