Atmel AT83SND2C MP3 MP3 Player User Manual


 
Communication Protocol
3-20 AT83SND2CMP3 User Guide
7525A–MP3–07/05
Example 1 Figure 3-6 . Transfer a File From Remote Controller to Player Selected Memory
During the file write transfer, after the FS_FCREATE command, no other commands
than FS_FWRITE_BLOCK, FS_FWRITE_LAST_BLOCKor FS_FCLOSE are allowed to
finish the file transfer because the AT83SND2CMP3 is an optimized transfer mode.
To create the file “wr_test.mp3” (total size 1312 Bytes: 2 block of 512 bytes + last block
288 bytes):
Send FS_FCREATE ( 3 blocks, ‘w’ ‘r’ ‘_’ ‘t’ ‘e’ ‘s’ ‘t’ ‘.’ ‘m’ ‘p’ ‘3’ ‘\0’)
Wait for response SYSTEM_ACK* frame.
Send FS_FWRITE_BLOCK + 1st block of data (512 bytes),
Wait for response SYSTEM_ACK* frame.
Send FS_FWRITE_BLOCK + 2nd block of data (512 bytes)
Wait for response SYSTEM_ACK* frame.
send FS_FWRITE_LASTBLOCK ( 288 bytes ) + last block of data (288 bytes)
Wait for response SYSTEM_ACK* frame. The file is now created.
Note: If Player response is SYSTEM_NACK to any command during this procedure, the Player
will return into the IDLE state and the file creation procedure will be aborted.
Controller Player
Transfering A File
From Rem ote
C o n tro ller to P layer
F
S
_
F
C
R
E
A
T
E
(
N
a
m
e
o
f
F
i
l
e
,
N
u
m
b
e
r
o
f
b
l
o
c
k
t
o
t
r
a
n
s
f
e
r
)
S
Y
S
T
E
M
_
A
C
K
+
S
T
A
T
U
S
F
S
_
F
W
R
I
T
E
_
B
L
O
C
K
+
d
a
t
a
S
Y
S
T
E
M
_
A
C
K
+
S
T
A
T
U
S
Player creates the
file on selected
memory (in root dir).
Now waiting for data.
Player programms
now the memory and
prepare Now waiting
for data.
F
S
_
F
W
R
I
T
E
_
L
A
S
T
_
B
L
O
C
K
+
d
a
t
a
S
Y
S
T
E
M
_
A
C
K
+
S
T
A
T
U
S
Player programs the
last block of data.
File is closed. No
need to send the
FS_FCLOSE frame.