26-Aug-10 USB-FileSys / USB-Config HW149-8 www.hexwax.com Operating systems may cache data locally, and so mo" />
參數(shù)資料
型號: TPFLXIC017
廠商: Microchip Technology
文件頁數(shù): 7/10頁
文件大?。?/td> 0K
描述: IC MICROCONTROLLER
標(biāo)準(zhǔn)包裝: 1
系列: *
p6 of 10
26-Aug-10
USB-FileSys / USB-Config
HW149-8
www.hexwax.com
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.
It was developed for the
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: Go to root directory.
02
Response:
Success.
00
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.
Table 6. FAT directory entry
Byte
Meaning
0-7
File name, padded with spaces
8-10
File extension, padded with spaces
11
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
12
Reserved
13-17
Creation date / time:
Bits 0-7:
Centisecond (1-199)
Bits 8-12:
Doublesecond (0-29)
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)
18-19
Date of last access:
Bits 0-4:
Date (1-31)
Bits 5-8:
Month (1-12)
Bits 9-15:
Year since 1980 (0-127 = 1980-2107)
20-21
Reserved
Table 6. FAT directory entry
Byte
Meaning
22-25
Last modified date / time:
Bits 0-4:
Doublesecond (0-29)
Bits 5-10:
Minute (0-59)
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)
26-27
Reserved
28-31
File length in bytes, LSB first
Supported by USB-FileSys except centiseconds
Supported by USB-FileSys in certain cases, see Close command
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: Find subdirectory “DATA”.
04 44 41 54 41 20 20 20 20 20 20 20 10
Response:
Success.
00 44 41 54 41 20 20 20 20 20 20 20 10…
Command: Move to the subdirectory.
05
Response:
Success.
00
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.
(The bytes market reserved must be left
unchanged.)
A second response byte will then be
received.
相關(guān)PDF資料
PDF描述
TPS2371D IC PWR INTRFCE SW FOR POE 8-SOIC
PIC16LF721-I/ML MCU PIC 4K FLASH 20-QFN
PIC16LF1507-E/SO IC MCU 8BIT 3.5KB FLASH 20SOIC
PIC16F1507-E/SO IC MCU 8BIT 3.5KB FLASH 20SOIC
PIC16LF1902-I/MV MCU 3.5KB FLASH LCD DVR 28-UQFN
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
TPFLXIC018 功能描述:插座和適配器 Access-Touch-SS FlexiPanel RoHS:否 制造商:Silicon Labs 產(chǎn)品:Adapter 用于:EM35x
TP-FUEL-0.250 功能描述:LABEL IDENTIFICATION TAPE RoHS:否 類別:計算機,辦公室 - 元件,配件 >> 標(biāo)簽,標(biāo)記 系列:TP-帶 標(biāo)準(zhǔn)包裝:1 系列:PANACEA™ 類型:標(biāo)簽 標(biāo)簽類型:熱敏式 標(biāo)簽尺寸:0.75" x 26.2'(19.1mm x 8.0m) 材質(zhì):聚酯 顏色:透明 適用于相關(guān)產(chǎn)品:熱敏打印機 包裝:卷 其它名稱:298-1346
TP-FUEL-0.375 功能描述:LABEL IDENTIFICATION TAPE RoHS:是 類別:計算機,辦公室 - 元件,配件 >> 標(biāo)簽,標(biāo)記 系列:TP-帶 標(biāo)準(zhǔn)包裝:1 系列:PANACEA™ 類型:標(biāo)簽 標(biāo)簽類型:熱敏式 標(biāo)簽尺寸:0.75" x 26.2'(19.1mm x 8.0m) 材質(zhì):聚酯 顏色:透明 適用于相關(guān)產(chǎn)品:熱敏打印機 包裝:卷 其它名稱:298-1346
TP-FUEL-0.500 功能描述:LABEL IDENTIFICATION TAPE RoHS:否 類別:計算機,辦公室 - 元件,配件 >> 標(biāo)簽,標(biāo)記 系列:TP-帶 標(biāo)準(zhǔn)包裝:1 系列:PANACEA™ 類型:標(biāo)簽 標(biāo)簽類型:熱敏式 標(biāo)簽尺寸:0.75" x 26.2'(19.1mm x 8.0m) 材質(zhì):聚酯 顏色:透明 適用于相關(guān)產(chǎn)品:熱敏打印機 包裝:卷 其它名稱:298-1346
TP-FUEL-0.625 制造商:TE Connectivity 功能描述:Connector Accessories Label Identification Tape