USB-FILESYS-SS HEXWAX, USB-FILESYS-SS Datasheet - Page 8

DRIVERFREE USB CONFIGURATION, 20SSOP

USB-FILESYS-SS

Manufacturer Part Number
USB-FILESYS-SS
Description
DRIVERFREE USB CONFIGURATION, 20SSOP
Manufacturer
HEXWAX
Datasheet

Specifications of USB-FILESYS-SS

Usb Type
FAT File System
Usb Version
2.0
No. Of Ports
1
Supply Voltage Range
1.8V To 5.5V
Operating Temperature Range
-40°C To +85°C
Digital Ic Case Style
SSOP
No. Of Pins
20
Package /
RoHS Compliant
Files can only be created after using the Get File Entry
By Short Name command.
Example 1 (open existing file):
Command:
Response:
Command:
Response:
Example 2 (create file):
Command:
Response:
Command:
Response:
Example 3 (create subdirectory):
Command:
Response:
Command:
Response:
Close File
This command closes the file associated with a file
handle. The first byte of the command is the value 0x0B.
The second is the “file handle” of the open file. The next
four bytes (LSB first) are the desired length of the file, or
0xFFFFFFFF if the length is to be the ‘expected length’.
The expected length is greater of the length recorded in
the directory entry and the highest position written to
while open.
The main effect of this command is to update the length
argument in the directory entry and, if it was shortened,
to free any unused clusters at the end of the file.
p8 of 10
03 04 00
00 46 52 45 44 20 20 20 20 54 58 54 01…
0A 01
00
04 44 41 54 41 20 20 20 20 20 20 20 01
02
0A 03
00
04 44 41 54 41 20 20 20 20 20 20 20 10
02
0A 00
00
What is the 5
current directory?
Success, file is a read-only file called
“FRED.TXT”
Open the file using handle 01
Success, file is open on handle 01
Find file “FRED.TXT” (note the read-only
attribute is set, although this is ignored
while searching for the file)
Create the file as read-only using handle
03
Success, file is open on handle 01
Find subdirectory “DATA”.
Create subdirectory (file handle ignored)
Success. (No file is opened)
Fail, file does not exist.
Fail, file does not exist.
26-Aug-10
th
directory entry in the
USB-FileSys / USB-Config
If external memory is used, the creation, modify and
access date/time are all fully updated as required. If
internal memory is used, these fields will only be
updated by USB-FileSys if the directory entry would
have been modified anyway.
created and when it is closed with a different length than
when it was opened.)
Example 1:
Command:
Response:
Read File
This command reads data from a file starting from the
file pointer position. The first byte of the command is
the value 0x0D. The second is the “file handle” of the
open file. The next four bytes are the position in the file
to
sequentially from the last read or write command. (If
there have been no previous read or write command,
the start of the file will be assumed.)
With the 28-pin device, the next two bytes are the
number of bytes to read, up to a maximum of 512. The
read must not cross the 512-byte sector boundary.
With the 20-pin device, the next two bytes are the
number of bytes to read, up to a maximum of 64. The
read must not cross the 64-byte page boundary.
Note:
ignored. The data may be read up to the last cluster
itemized in the file allocation table.
The response will be the status byte followed by the
data bytes read.
Example:
Command:
Response:
Write File
This command writes data to a file starting from the file
pointer position. The first byte of the command is the
value 0x0E. The second is the “file handle” of the open
file. The next four bytes are the position in the file to
write to, 0xFFFFFFFE to append onto the end of the file,
or 0xFFFFFFFF to continue on sequentially from the last
read or write command. (If there have been no previous
read or write commands, the start of the file will be
assumed.)
With the 28-pin device, the next two bytes are the
number of bytes to write, up to a maximum of 512. The
write must not cross the 512-byte sector boundary.
0B 02 FF FF FF FF
00
0D 02 23 01 00 00 04 00
00 12 34 56 78
read
The file length information in the directory is
from,
HW149-8
Close file handle 02 with expected length
Success
Read 4 bytes at position 0123 from file
handle 02
Success, data is 12 34 56 78.
or 0xFFFFFFFF
(i.e. When the file is
to continue
www.hexwax.com
on

Related parts for USB-FILESYS-SS