Getting Started

(lily) #1

Chapter 8: C Pointers and Arrays


SIG L
{


Finally change Demonstrator.h to:


parseInput(char *);

int parseTune(char *);
void startTune(char);


void volumeUp(void);
void volumeDown(void);
void stopTune(void);


void Sound_Init(void);
void Timer0_Init(void);


Using Play it again Sam:


This is what you should see in HyperTerminal, and an example of use:


You are talking to the 'Play it again Sam' demo.
Enter 1 for Fur Elise.
Enter 2 for Turkey march.
Enter 3 for Minuet.
Enter 4 for Auld Lang Syne.
Enter 5 for Sirene1.
Enter 6 for Sirene2.
Enter 7 for Whistle.
Enter + to increase the volume.
Enter - to decrease the volume.
Enter stop to stop the music.
4
Auld Lang Syne
1
Fur Elise


NA (SIG_OUTPUT_COMPARE0)

Play_Tune();
}


// Demonstrator.h PWM version


void initializer(void);
void

Free download pdf