Cypress Semiconductor CY8C21534 Specifikace Strana 34

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 69
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 33
27
Within the software of the MCU there are two arrays that are used in the writing of
data to the SD card. The first is the FAT entry and the second is the Directory entry.
The arrays can be seen in figure 19.
Figure 19: SD Card File Information Arrays.
Figure 19 shows the information that needs to be written to the SD card so that the file
is recognized as a picture file. The only information that is modified is the size of the
file when the MCU is retrieving information from the server program. It is not
necessary to have a file system erase and create a new file every time, because only
one file is needed for display at a time. This allows the system to use the same file
space repeatedly, verses finding free space every time a write command needs to be
executed. Additionally, the proper use of a filing system on the MCU would require
more memory than is available. Once the file size of the Directory entry has been
modified, the MCU writes the FAT entries and the Directory entries to the SD card. Two
FAT entries are needed for filing system redundancy checks. For the card used on this
project the first FAT entry is in the address space sector 2, the second FAT entry is
in address space sector 241, and the Directory entry is made in sector 480. As the
arrays for these entries are under 512 bytes, and a successful write command needs
512 bytes exactly, the remaining missing bytes are filled in with the hex value 0x00.
Filling the remaining data in a sector with dummy bytes was accomplished with a
FOR loop count of 512 minus the partial raw data in the sector. The Communications
MCU is then ready for the raw file data.
Zobrazit stránku 33
1 2 ... 29 30 31 32 33 34 35 36 37 38 39 ... 68 69

Komentáře k této Příručce

Žádné komentáře