FATEngine Beta Demo

Thank you for taking the time help test out the FATEngine: a fully functional FAT16/32 file system driver library. To help you get started working with this tool please refer to the rest of this document. 

System Configuration

You will need to first edit the included spin files to match your system configuration so that you can test out the demo. If you have a DS1307 real time clock please attach it to the specified pins below.

	Open the RTCEnigne.spin file in this folder and change the pin numbers to match the pin numbers of where your DS1307 RTC is attached in the CON block at the top of the code. If you do not have a DS1307 RTC the included demo code will still function, however all time stamps will be invalid.

	Open the FATEnigne.spin file in this folder and change the pin numbers to match the pin numbers of where SD/SDHC/MMC Card is attached in the CON block at the top of the code.

Open the COMEngine.spin file in this folder and change the pin numbers to match the pin numbers of where Prop Plug is attached in the CON block at the top of the code.

Open the Demo.spin file in this folder and change the baud rate to match the baud rate of the specified baud rate when using parallax serial terminal. Additionally please change the clock frequency to your system configuration at the top of the Demo.spin file to match your setup.

Serial Terminal

Please open parallax serial terminal and connect to the propeller chip using the specified baud rate you set in the Demo.spin file. The demo program waits 5 seconds to let you get ready before running. After this the demo program should display a welcome message and a “>_” command cursor.

Serial Terminal Commands

The following is a complete list of commands that the serial terminal demo program will execute. Please note that the max command length is 255 characters after which a buffer overflow error will occur. The serial terminal will recover from this error but your command will be discarded. 

General Commands:

“clear” <no arguments>  - Clears the terminal screen.

“echo” <anything> - Echoes back whatever was typed after the command.

“date” <no arguments> - Returns the current date fetched from the DS1307 RTC. If you do not have the DS1307 RTC the date returned will be invalid.

“time” <no arguments> - Ask the user for all specified timing parameters to set the date on the DS1307 RTC.

File System Commands

 “mount” <partition Number (0-3)> <check disk flag (c)> - Mounts the specified partition on the SD Card for file system access. An SD card must be attached to the system or an error message will be displayed. A partition must be mounted for any other commands to execute. Please un-mount the partition when finished. The check disk flag causes windows to run check disk on the SD Card if not un-mounted properly when the disk is plugged into a windows machine.

“umount” <no arguments> - Un-mounts the active partition allowing another to be mounted and writes file system optimization data back to the disk. Additionally deactivates the rest of the file system functions the turns off any raised check disk flags.

“df” <fast mode (f)> - Computes the count of free 512 byte sectors on the partition. Use the fast mode flag (f) to ask the function to return previously computed values instead of computing new ones. If no previously computed values are available this function will compute them after which fast mode will be valid. Computing the free sector count can take a long time.

“du” <fast mode (f)> - Computes the count of used  512 byte sectors on the partition. Use the fast mode flag (f) to ask the function to return previously computed values instead of computing new ones. If no previously computed values are available this function will compute them after which fast mode will be valid. Computing the used sector count can take a long time.

“ls” <no arguments>  - List all files and folders in the current directory with along with their last access date, last modification date, and creation date as well as their size and attributes. Directories have no size. Only files have size. The attributes letters mean: R – Read Only, H – Hidden, S – System, A – Archive, and D- Directory.

“find” <entry name> - Verifies the specified file exist in the current directory.

“cd”  <directory name> - Enters into the specified directory allowing file system access to all files within that directory.

“attrib” <entry Name> <new attributes> - Changes the attributes of the specified file or directory to the new specified attributes. The new attributes are:  R – Read Only, H – Hidden, S – System, A – Archive.

“rename” <entry Name> <new Entry Name> - Changes the specified file or directory’s entry name to the new specified entry name.

“rm” <entry Name> - Removes the specified file from the current directory or deletes any empty directory from the file system  permanently.

“mkfile” <file name> - Makes a new file in the current directory with the specified name.

“mkdir” <directory Name> - Makes a new directory in the current directory with the specified name.

“cat” <file name> <type flag> - Displays the contents of the specified file in either binary, hexadecimal, decimal, or ASCII characters. The type flag can be: B – Binary, D – Decimal, H – Hexadecimal, A –ASCII.

“test” <file name> - Creates a temporary file to test read and write character and block performance of the driver. After which results are printed to the screen and the file temporary file is deleted.

That’s all folks!