SanDisk CompactFlash 5000 Bedienerhandbuch Seite 18

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 56
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 17
Publication LOGIX-AP007B-EN-P - January 2007
18 CompactFlash Commands
Read Command
The Read command is used when you want to read data from the
CompactFlash card. A file must exist on the CompactFlash card before
executing this command.
The read command is broken into six commands:
The file is open.
The file pointer is set.
The file is read.
Only 450 bytes can be read at one time from the file. Therefore, reading
from the file is broken down into 450 byte chunks. This moves the data
into the data_read array.
The checksums are calculated and compared to those in the file. The
data is then parsed into the Data array in the CF_Data_Working UDT.
The file is closed.
Error handling is performed, if needed.
Set Up the Read Command
To set up the read command, you need to set the bit execute_CF_Read_Data.
The application code handles resetting this bit.
1. Define a file name including a file extension, for example, testfile1.dat.
2. Enter the number of bytes you want to read from the file.
3. Move the data from the data array in the CF_Data_Working UDT when
the read is completed.
Only 450 bytes can be read at one time from the file. Therefore, reading
from the file is broken down into 450 byte chunks. This moves the data
into the data_read array.
We recommended that you clear the data array before moving the data
into the array. This will clear out any data from previous read or write
commands.
Refer to Chapter 4, Example Application for complete instructions.
TIP
If the checksums are not calculated, compared, and parsed,
the file closes and the read sequence is restarted from the
beginning.
The application will attempt to read the file four times.
After the fourth failure a checksum error is set.
Seitenansicht 17
1 2 ... 13 14 15 16 17 18 19 20 21 22 23 ... 55 56

Kommentare zu diesen Handbüchern

Keine Kommentare