Specifications

Open file
Read file data
Send packet
Process 1
Create file
Write data to
file
Receive
packet
Process 2
Read data from
sostream
Write data to
sostream
Ethernut
Ring buffer
Figure 14 TCP file transfer through the Ethernut with a ring buffer
The Ethernut does not transfer the data to process 2 until the buffer gets full. At this
stage it also stops reading data from process 1 until the buffer becomes empty again.
Testing this showed that the file came out the other side intact and that the Nut OS
could regulate the TCP streams so that data was not lost; an expected outcome but one
worthy of testing nonetheless. Since it was found that data could be stored in the buffer,
the next step was to see if the MP3 decoder could use it to play MP3s.
5.3.5 Interfacing the MP3 decoder
To play MP3 data the VLSI had to be connected to the Ethernut and the software
interface had to be developed. The first stage was to wire up the bus between the piggy
back board and the Ethernut board. On the home page of the manufactures of the piggy
back board [19] YAMPP provide the interface code required to operate the decoder,
which provides the user with code to initialise the decoder, send it MP3 data, software
reset and a sine wave test data set. This code was written for an Atmel 90S8515
processor so it would have to be modified to operate on the Atmel ATmega103 with the
Nut OS. When searching through the Nut OS [9] examples of how to use its SPI
functions, it was found that they had already modified the test code to work with the
Nut OS and the Atmel mega103. At the time of deciding which hardware and operating
system to use for the project the interface to the MP3 decoder was not included in the
Nut OS, but shortly after the Ethernut board was delivered they included it in an
updated version. The code they provide is a modification of the YAMPP code that
comes with the MP3 piggy back board.
31