Specifications

Receive MP3
data from
server
Increment the
receive
pointer
Reset the
poin ter if it is
past the buffer
boundary
Is the
buffer set
to refill
Is it full
Start the
decoder
Calculate the
buffer size
If buffer is empty
send indiactor to
HyperTerminal
Is the
buffer
full
Send indicator to
HyperTerminal
and wait for there
to be room in the
buffer for another
receive.
No
Yes
No
Yes
Yes
No
Figure 18 First program to play MP3 data
The program starts by receiving the data into the buffer. When the buffer gets to a size
of greater than 10Kbytes the global variable enabling transmission of data to the
encoder is enabled and the software trigger is called to start the first interrupt. The
interrupt needs to be software triggered whenever the decoder is currently not
transferring and the program wants to start a transfer. The decoder is not transferring
(not making data requests) in the first instance of use with the decoder or when the
decoder has requested data but the MP3 data buffer is empty or transmission to the
decoder has been disabled. To trigger the interrupt with software a signal can be sent to
37