USB-FILESYS-DIL HEXWAX, USB-FILESYS-DIL Datasheet - Page 6

DRIVERFREE USB CONFIGURATION, 28DIL

USB-FILESYS-DIL

Manufacturer Part Number
USB-FILESYS-DIL
Description
DRIVERFREE USB CONFIGURATION, 28DIL
Manufacturer
HEXWAX
Datasheet

Specifications of USB-FILESYS-DIL

Usb Type
FAT File System
Usb Version
2.0
No. Of Ports
1
Supply Voltage Range
2.7V To 5.5V
Operating Temperature Range
-40°C To +85°C
Digital Ic Case Style
DIP
No. Of Pins
28
Package /
RoHS Compliant
Operating systems may cache data locally, and so
modifications made by the circuit may not necessarily
immediately apparent on the PC.
Sample Host Source Code
Sample C source code for host controllers is supplied in
the development kit.
PIC18F2320, but should be readily portable to other
microcontrollers. 28-pin PIC18F devices will fit in the
host controller socket in the evaluation board.
Root Dir
This command sets the current directory to the root
directory. The first byte of the command is the value
0x02. There are no further bytes. The response is the
status byte.
Example:
Command:
Response:
Get File Entry By Index
This command retrieves information about a directory
entry in the current directory. This could be a file, a
subdirectory, or a volume label. The first byte of the
command is the value 0x03. The second byte and third
bytes are the index number of the subdirectory or file in
the current directory being requested (least significant
byte first, zero-based).
The response will be the status byte and, if the status
byte is zero, the standard FAT directory entry data bytes
as shown in table 6. See the Set File Entry command
for an example.
p6 of 10
13-17
18-19
20-21
Byte
02
00
8-10
0-7
11
12
Meaning
File name, padded with spaces
File extension, padded with spaces
Bit 0: Set if item is marked as read-only
Bit 1: Set if item is marked as hidden
Bit 2: Set if item is marked as a system file
Bit 3: Set if item is a volume label
Bit 4: Set if item is a subdirectory
Bit 5: Set if item is marked for archiving
If bits 0-3 all set, is an ignorable VFAT entry
Reserved
Reserved
Creation date / time:
Date of last access:
Bits 0-7:
Bits 8-12:
Bits 13-18: Minute (0-59)
Bits 19-23: Hour (0-23)
Bits 24-28: Date (1-31)
Bits 29-32: Month (1-12)
Bits 33-39: Year since 1980 (0-127 = 1980-2107)
Bits 0-4:
Bits 5-8:
Bits 9-15:
Go to root directory.
Success.
Table 6. FAT directory entry
26-Aug-10
Centisecond (1-199)
Doublesecond (0-29)
Date (1-31)
Month (1-12)
Year since 1980 (0-127 = 1980-2107)
It was developed for the
USB-FileSys / USB-Config
Get File Entry By Short Name
Same as Get File Entry command, except searches for
a file that matches the name and attributes supplied.
The first byte of the command is the value 0x04. The
next 8 bytes are the file name, padded with spaces.
The next 3 bytes are the file extension, padded with
spaces. Last is the attribute byte, usually 0x00 for a file,
0x10 for a subdirectory, or 0x08 for the volume label, as
specified by byte 11 of table 6. (Only the volume label
and subdirectory bits are used when searching for a file.
Other bytes are only used if a non-existent file is then
created using the Open command.)
For examples, see the Change Dir and Open
commands.
Change Dir
This command sets the current directory to the file
returned by the immediately preceding Get File Entry By
Index or Get File Entry By Short Name command. This
last file must be a subdirectory; it cannot be the “..”
pointer to the parent directory. The command consists
of the byte 0x05 only. The response is the status byte.
Example:
Command:
Response:
Command:
Response:
Set File Entry
This command sets directory entry of the file returned by
the immediately preceding Get File Entry By Index or
Get File Entry By Short Name command. The one-byte
the command is the value 0x06. A response byte will be
received. Assuming this the Success response 0x00,
the 32 file entry data bytes are then sent, as specified in
table 6.
unchanged.)
received.
22-25
26-27
28-31
Byte
04 44 41 54 41 20 20 20 20 20 20 20 10
00 44 41 54 41 20 20 20 20 20 20 20 10…
05
00
‡ Supported by USB-FileSys in certain cases, see Close command
Meaning
Last modified date / time:
Reserved
File length in bytes, LSB first
(The bytes market reserved must be left
Bits 0-4:
Bits 5-10:
Bits 11-15: Hour (0-23)
Bits 16-20: Date (1-31)
Bits 21-24: Month (1-12)
Bits 25-31: Year since 1980 (0-127 = 1980-2107)
HW149-8
Find subdirectory “DATA”.
Success.
Move to the subdirectory.
Success.
Table 6. FAT directory entry
A second response byte will then be
† Supported by USB-FileSys except centiseconds
Doublesecond (0-29)
Minute (0-59)
www.hexwax.com

Related parts for USB-FILESYS-DIL