Motorola simplefi Especificações

Consulte online ou descarregue Especificações para Recetor Motorola simplefi. Motorola simplefi Specifications Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir

Resumo do Conteúdo

Página 1 - Network Interface

MP3 Player With Network Interface By Michael Somersmith School of Information Technology and Electrical Engineering, University of Queensl

Página 2 - Abstract

By the completion of the thesis, the player was operating as you would hope it to. It can play MP3s that are stored anywhere on the network, whether

Página 3

Appendix D – Decoder interface Source code /* * Copyright (C) 2001-2002 by egnite Software GmbH. All rights reserved. * * Redistribution and use i

Página 4 - Acknowledgements

* First pre-release with 2.4 stack * */ /* * MP3 player with network interface. * The Ethernut code * Engineering Thesis 2002 * Modified

Página 5 - Table of Contents

*/ if(tx_ptr == wr_ptr) { empty = 1; tx_act = 0; break; } /*

Página 6

* Set data line. */ if(data & mask) sbi(VS_SI_PORT, VS_SI_BIT); else cbi(VS_SI_PORT, VS

Página 7 - List of tables

{ /* * Set BSYNC high. */ sbi(VS_BSYNC_PORT, VS_BSYNC_BIT); outp(b, SPDR); asm volatile("nop\n\tnop\n\tnop\n\tnop\n\tn

Página 8 - Chapter 1 – Introduction

u_char on[] = { 0x53, 0xEF, 0x6E, 56 }; u_char off[] = { 0x45, 0x78, 0x69, 0x74 }; on[3] += (fsin & 7) * 9; for(i = 0; i <

Página 9 - 1.2 Solution

100 */ sbi(VS_SI_DDR, VS_SI_BIT); /* * Set SS to output for SPI master mode. */ sbi(VS_SS_DDR, VS_SS_BIT); /* *

Página 10 - 1.3 Thesis overview

Chapter 4 explains how the development platform was chosen for the project. The development platform for this project was a microcontroller based sol

Página 11

Chapter 2 – Background 2.1 What are MP3s? MP3 stands for MPEG Audio Layer 3. MPEG is the name of a working group established under the joint directi

Página 12 - Chapter 2 – Background

2.2 The TCP/IP protocol. TCP/IP stands for Transmission Control Protocol/Internet Protocol. It is frequently referred to as a “stack” because of the

Página 13 - 2.2 The TCP/IP protocol

2.3 Current MP3 players with a network interface. As mentioned in the introduction the inspiration for the topic predominantly came from the AudioTr

Página 14

Figure 3 Functional diagram of the AudioTron [3] To operate the AudioTron the user must install software to enable interaction with the Windows file

Página 15

the PC software for it to operate, reduce the autonomy of the device. The SimpleFi’s main advantage is that it can transmit the data wirelessly. Spec

Página 16

Chapter 3 – Specifications The main requirement for the player to be implemented is the ability to able provide similar functionality to the AudioT

Página 17 - Chapter 3 – Specifications

To achieve the above specifications the product was broken up into the components shown in figure 5. CentralProcessingPlay ListManagementFile transfe

Página 18

Chapter 4 – The development platform When planning how to implement this device it quickly became apparent that it would require far too much time (

Página 19 - 4.1 Platform requirements

Abstract Compressing raw audio with the MP3 standard can reduce the storage space required by approximately one twelfth. [17] This has made it possib

Página 20 - 4.2 The Hardware

physical layer was primarily based on one that is compatible with the microcontroller. Important factors when deciding on a microcontroller and an op

Página 21

without worrying about handling the threads related to handling the network protocol. The operating system would then handle the stack management and

Página 22

development boards combined with TCP/IP development kits exceed US$500. And this is only for the networking side of the project. The obvious alterna

Página 23

The hardware features of the Ethernut kit are as follow: Atmel ATmega 103 processor running at 3.6864 Mhz Realtek IEEE 802.3 compliant Ethernet c

Página 24

4.2.5 Embedded MP3 decoding technology The available MP3 decoder technology seems rather simple compared to the networking solutions. Most of the chi

Página 25

Figure 7 The MP3 decoder board [19] 19

Página 26

Chapter 5 - Implementation of software Before a decision had been reached about the Ethernut an investigation was carried out for other embedded TCP/

Página 27 - 5.2 The Ethernut Software

It appears that most of the TCP/IP software discussed on the internet seemed to use TCP/IP with an operating system due to ease of development and al

Página 28 - 5.3 Software development

5.3 Software development 5.3.1 Accessing Windows file system from a remote embedded environment When this project was started it was comprehensible

Página 29 - 5.3.1.2 The Server program

Windows provide an application protocol above TCP/IP called Server Message Block (SMB) or common internet file sharing protocol (CIFS), as it is call

Página 30

through standard track controls: play/pause, stop, next and previous track. The player decodes these and sends them as commands to the server which w

Página 31

The design question then turned from how to implement SMB on the player to how to implement it on the PC. How does one write a Windows program that

Página 32

MP3 decoderBufferNetworking The playerMicrosoftWindowsGraphicalUser interfaceServer programComputer Figure 9 Overall design revision two The pl

Página 33

if they are called the thread will stop and will only continue once they are complete. The second way is to create what the Nut OS calls a SoStream (

Página 34

5.3.3 Sending files from the PC to the Ethernut To test whether the Ethernut can transfer files successfully, the server program on the PC first has

Página 35 - 5.3.4.2 The local buffer

5.3.3.2 Sending files over TCP with the Ethernut To test whether the same could happen through the Ethernut, the Ethernut was added into the loop. T

Página 36

5.3.4.1 The buffer system A 20 Kbyte ring buffer was implemented on the Ethernut. This translates to about 1-2 seconds worth of audio. It doesn’t sou

Página 37

Transmitpointer*Receivepointer*End Addressof the bufferStarting Addressof the bufferMemoryaddresses Figure 13 The ring buffer The buffer works by us

Página 38

Open fileRead file dataSend packetProcess 1Create fileWrite data tofileReceivepacketProcess 2Read data fromsostreamWrite data tosostreamEthernutRing

Página 39 - Place data into

Before running the code, the piggy back board was connected to the Ethernut. The 12 connection are outlined in table 3. Piggy back connection Functio

Página 40

Select thecommandregisterDisable theAtmel SPImoduleWrite each bitto the dataline and togglethe clockEnable theAtmel SPImoduleSelect thedata register

Página 41 - 5.3.6 Playing MP3 data

Acknowledgements Rebecca Somersmith for her love and support. Peter Sutton for allowing me to take on a thesis topic that I enjoyed, and providing

Página 42

To test the connections of the bus and the functionality of the decoder board, the decoder was sent the test sine wave. To do this the decoder had t

Página 43 - Calculate the

5.3.6 Playing MP3 data To play the MP3 data that is stored in the buffer through the MP3 decoder, the transfer needs to be at one byte at a time. The

Página 44

This function is the interrupt service routine that is called when the DREQ line of the VLSI goes high. This pin goes high whenever the buffer in the

Página 45 - HyperTerminal

Receive MP3data fromserverIncrement thereceivepointerReset thepoin ter if it ispast the bufferboundaryIs thebuffer setto refillIs it fullStart thedec

Página 46

the OS indicating which interrupt you want to trigger. Once the interrupt has been triggered, the transmission of data to the decoder will start. If

Página 47

Receive MP3data fromserverIncrement thereceivepointerRes et thepointer if it ispast the bufferboundaryIs thebuffer setto refillIs it fullStart thedec

Página 48

5.3.7.1 Speeding up the network transfer Small changes to try to optimize the code were made while monitoring the buffer size that was being output

Página 49 - Copy the next line of

recovered nearly immediately so it was close to being fast enough. At this stage it was decided to change from using a 128kbbs test file to a larger

Página 50 - 5.3.7 Adding user controls

long or intense, indicating that the clicks were definitely something to do with the pointers at the end of the allocated space. The second problem

Página 51 - 5.3.7.1 Play/Pause Button

was just a text file that listed each file to be open on separate lines with their path in front of the filename. For example: C:\mp3\The Whitlams\Et

Página 52

Table of Contents Chapter 1 – Introduction ... 2 1.1 Moti

Página 53 - 5.3.7.2 Stop Button

It reads this play list file counting the number of character returns. When the number of character returns is one less than the song number, it read

Página 54 - Decoder transfer

button was pressed. The tests showed that de-bounce and the interrupts worked but the buffer for the MP3 data kept emptying. This was surprising, bec

Página 55

Receive MP3data fromserverIncrement thereceivepointerReset thepo inter if it ispast the bufferboundaryIs thebuffer setto refillIs it fullStart thedec

Página 56

failing. The pause button was then pressed again to undo pause and the player stated producing music from the point it left off. The first test pro

Página 57

number as previously. This resets the file handler back to the start of the file, ready to play from the start when play is pressed. The results of

Página 58 - 5.3.8.1 Integrating the LCD

to the upper limit that was passed to the function. It returned before the full 1.5Kbyte packet was received, normally at 536 bytes. This was while t

Página 59

Receive MP3data fromserverIncrement thereceivepointerReset thepo inter if it ispast the bufferboundaryIs thebuffer setto refillIs it fullStart thede

Página 60

management. How was it possible that the GAP can be put into the middle of old data in the buffer? It did not make sense, for a long time the Nut OS

Página 61 - If greater

song from the play list without buttons being pressed. This would allow the buffer to be unaffected by the GAP and discarding of data algorithms. The

Página 62

The LCD has three control lines, Read/Write, enable and register select. It has a processor on board with two registers that are accessed via its bus

Página 63

5.3.6 Playing MP3 data... 35 5.3.7 Making the music sound as

Página 64

Figure 25 The initialisation of the LCD [23] The values at (1), (2), (3), (4), and (5) are the configuration data written to the LCD module using t

Página 65 - 5.3.9.4 Winamp as the GUI

Goto position0,0Stringpointer =NULLPrint pointer atcursor positionon the LCDIncrementpointerPosition ofnext character> LCDcolumnsGoto position1,0T

Página 66

5.3.8.2 Extracting the song name To get the song name to the LCD from the filename, it was necessary to extract the required string from the songs e

Página 67

There are two buffers represented in the flow chart. The path buffer is the buffer the openMP3 function creates to store the path and filename in and

Página 68

Initial tests with the Ethernut showed that the web server functions that it provided were very useful. Commands could easily be passed to the web se

Página 69

would in turn talk to Windows to get the required information about files and then pass this on to the GUI. At the same time it was decided that the

Página 70 - 6.3 Personal reflection

#EXTINF:322,Jeff Buckley - Grace C:\mp3\Jeff Buckley\Grace\02 - Grace.mp3 #EXTINF:275,Jeff Buckley - Last Goodbye C:\mp3\Jeff Buckley\Grace\03 - Last

Página 71

Chapter 6 - Design evaluation The evaluation of the design for this player is unfortunately quite a subjective one. How does one assess whether they

Página 72

The player can successfully play MP3s, up to and including 250kbbs, data rates with perfect audio quality. The test for this specification was to cre

Página 73

quickly navigate the play list while the player is in playback mode. Playback does not resume until the user finally takes their finger off the butto

Página 74 - Chapter 8 - Conclusion

List of figures Figure 1 The network layers [1] ... 7 Figure 2 T

Página 75

6.2 Fulfilling the subtle requirements The finer details of an audio device are also worth mentioning. The user controls on the player are very easy

Página 76 - References

decisions that were significant for finishing the product on schedule. The decision to implement a server program on a PC, instead of implementing an

Página 77

Chapter 7 - Future Improvements The previous chapters have outline how the idea for the thesis came about and how the idea was developed in to full

Página 78 - Appendices

7.2 Extensions to the Current Design. After developing the user interface on the player itself there are a wide range of extra features that could be

Página 79

Chapter 8 - Conclusion The outcome of this thesis was to produce an MP3 player that solved the problem with the current MP3 player solutions. The p

Página 80

also extracts the song name of the file selected to play and sends it the Ethernut which displays it on the LCD. The buttons connected to the Ethernu

Página 81

References 1. Sutton, P. ‘COMS3200, Lecture 2’, University of Queensland, URL:http://www.itee.uq.edu.au/~coms3200/, (Sept, 2002) 2. ‘Music across

Página 82

17. ‘MP3’, (1999), Webopedia, URL:http://www.webopedia.com/TERM/M/MP3.html, (Sept, 2002) 18. Nullsoft Winamp Home Page, http://www.winamp.com/, (Sep

Página 83

Appendices Appendix A – The Player Source code /* * MP3 player with network interface. * The Ethernut code * Engineering Thesis 2002 * by Mic

Página 84

static HANDLE q_stop = 0; static HANDLE q_next = 0; static HANDLE q_previous = 0; char button = 0; char first = 1; /* * Pause button ISR */ static

Página 85

Chapter 1 – Introduction 1.1 Motivation MP3s are quickly becoming a very popular format for audio storage. As a result, the number of MP3 players av

Página 86

/* Signal to debounce that a button has been pressed */ button = 1; /* change mode to stop */ play = 0; /* This will discard all transfer u

Página 87

/* * debounce thread */ THREAD(debounce, arg) { while(1){ /* Wait for button press */ NutSleep(100); if (button){ /* Re -

Página 88

* Nut/OS automatically calls this entry after initialization. */ THREAD(NutMain, arg) { TCPSOCKET *sock; int bytes; int buffer_in = 0; int

Página 89

*/ NutRegisterDevice(&devEth0, 0x8300, 5); /* * Configure lan interface. * */ NutNetIfConfig("eth0", ma

Página 90

/* Reset the decoder */ VsReset(0); discard = 0; /* * Place the transmit pointer to

Página 91

/* If set the buffer is set to refill */ if(first){ /* If the buffer is full again */ if(buffer_in >

Página 92

Appendix B – Server Source code /* * MP3 player with network interface. * Server software * Engineering Thesis 2002 * by Michael Somersmith

Página 93

/* place the number in the string */ while(length>0){ tmp = length - 1; power = 1; while( tmp > 0 ){ power *=

Página 94

/* Add the song number to the start of the song name */ song_to_send_ptr += add_number_song_name(song_count, &song_name_to_send

Página 95

* and to write to */ song_name_ptr = &song_name[0]; songs_ptr = &songs[0]; ReadFile (PlayList, &songs[0], 100000, &bytes,

Página 96

ideal for playback as a stream of data remote from where they are stored. This is not a new idea; it is commonly done on a PC, where people can play

Página 97

} else { /* close old MP3 file */ CloseHandle(FileHandle); /* send the new song name to the ethernut */ send_song_name(song_no, &am

Página 98

song_no++; open_MP3(song_no); reopen = 1; if(stop == 0){ go = 1; } /* NEXT decrements the song count and opens th

Página 99

/* Set up the network information structures */ server.sin_family = AF_INET; server.sin_port = htons(iPort); server.sin_addr.s_addr

Página 100

printf("connecting\n"); if (connect(song_Server, (struct sockaddr *)&song_server, sizeof(song_server)) == SOCKET_ERROR) {

Página 101

printf("Done\r\n"); } /* Send the MP3 data to the ethernut */ bytes_sent = send(Server, &buffer[0],

Página 102

Appendix C – LCD interface source code /* * MP3 player with network interface. * The Ethernut LCD code * Engineering Thesis 2002 * by Michael

Página 103

} /* clear the rest of line 1 and line 2 */ if(line == 0){ while(counter < NO_COL){ counter++; putch(' ');

Página 104

delay2 (40); control(0x02); // 4 bit control(0x08); // 2 lines delay2 (40); control(0x00); //display on, cursor off, blink off

Página 105

char temp; u_char priority; /* Set the thread priority to the highest */ priority = NutThreadSetPriority(10); LCD_RS(1); // select the d

Página 106

printxy(0,0," "); printxy(1,0," "); } 93

Comentários a estes Manuais

Sem comentários