Instructions Circuit Diagram

- 82 -
vWaitMilliseconds(500);
Calling function vWaitMilliSeconds and insert a variable 500.
Thisfunctioncanbefoundinle‘YETI.c’,whichcanbeopenedfor
reading in Programmers Notepad2. The function will be using an inter-
nal microcontroller counter, to wait for a prescribed number of milli-
seconds and then return to the calling program. The function will
accept a number of milliseconds (1/1000th second) and the above
calling sequence will generate a waiting cycle of half a second.
YETI’s acoustic signals
#The following program will generate a sample of YETI’s
acoustic signals.
#include“YETI.h” //loaddenitionsandfunctions
int main(void){ //main function entry
vInitYeti(); //initialize all microprocessor
//modules in the YETI
vBeep(400,80); //make YETI generate a beep sound
vBeep(520,120); //make YETI generate a beep sound
vBeep(360,80); //make YETI generate a beep sound
vBeep(580,160); //make YETI generate a beep sound
return 0; //terminating the main function
} //end of the main function
vBeep(400,80);
will call function ‘vBeep’ at a pitch of 400 and a duration of 8 x 10
= 80 milliseconds.