Home
uALFAT™ User Manual Revision 1.10
Contents
1. 10 31564 UART Baud E 12 0 Getting Stated sca nec beanies ote Sane 12 Gil Directories Folders E 13 625 aa a a a a a 13 25 UALFATM Eror CodeS rakane O atau 16 8 17 Pover And 18 10 Sp cial Firm Ware ar oae a ERE 18 11 Development and OEM Circuit Boards 18 l2 Iera E 19 GHI Electronics LLC 2 User Manual uALFAT File System Made Easy 1 Introduction 1 1 FAT File System Memory cards are very popular these days Their small size and rather huge storage makes them ideal for digital cameras and MP3 players Managing and organizing data on a memory card is not an easy task It requires a robust file system There are many file systems out there but FAT which stands for File Allocation Table is the most popular one FAT was introduced by Microsoft with DOS operating system and FAT is still supported by all versions of Windows operating systems even Windows XP To be compa
2. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE COMPANIES WHO UNITIZE uALFAT OR USBwiz IN THEIR PRODUCTS MUST CONTACT MICROSOFT CORPORATION FOR FAT FILE SYSTEM LICENCING GHI ELECTRONICS LLC SHALL NOT BE LIABLE FOR UNPAID LICENSE S SPECIFICATONS ARE SUBJECT TO CHANGE WITHOUT ANY NOTICE GHI Electronics LLC 19 User Manual
3. If uALFAT chip detects invalid firmware then it returns BL again In such case reprogramming uALFAT chip is required If uALFAT powers up in standalone mode it will execute the firmware immediately no BL will be sent 3 2 Boot Loader Use The easiest way to update uALFAT is by placing the new firmware on any SD card using any PC and a card reader Once you have the firmware on the card connect the same card to uALFAT The file must be placed in the root directory not in any folder We recommend using newly formatted media Now you are ready to send the update command The command is 3 characters LOK Load OK If needed a user can update the new firmware by sending it over SPI I2C or UART All commands return followed by the error number Also the boot loader will respond with Wxx lt CR gt on every sector write where xx is the sector number The firmware file is encrypted file Loading an incorrect file on uALFAT can damage the chip Never tamper with the firmware files GHI Electronics LLC 6 User Manual uALFAT File System Made Easy 3 3 Boot Loader Commands Command Use Notes R Load and run uALFAT firmware If Boot loader return BL then reprogramming uALFAT is required LOK Load firmware file from Returns 00 if pass or xx error code connected media W Write one sector to internal Follow W by the sector number then 512 FLASH bytes of sector data Transaction must be t
4. 1 8V crystal and very few RCs Check the pin description and schematics for more details You can also find more details on the chipset base LPC2103 data sheet on Philips website www semiconductors philips com and the schematics of uALFAT SD on our website www ghielectronics com Special Firmware uALFAT s standard firmware contains many features to suite any application If your application requires a special need we can implement a special firmware to suite your needs Loading the updated firmware or special firmware is extremely easy Look at the boot loader section Cost for special firmware is fairly low We charge 60 h with a minimum of 25 hours Development and OEM Circuit Boards uALFAT SD is our uALFAT chip on a small size board The low cost and the ease of use make uALFAT SD the ultimate solution for OEMs or hobbyists The SD MMC media connector is placed on one side of the board making it possible to mount the uALFAT SD board inside your product case using 90 degree brackets The full schematic and board layout is on our website www ghielectronics com uALFAT SD board contains 1 8 V regulator onboard You will only need 3 3V for power The pin out of the board gives you access to SD card detect and pins to all uALFAT s signals We are also capable of designing special boards to fit your needs GHI Electronics LLC 18 User Manual uALFAT File System Made Easy 12 Licensing Each uALFAT chip comes with un
5. I2C_SCL Clock pin for I2C 19 VSS Ground 20 Pin 1 for 32 768 KHz oscillator Optional for RTC with backup battery 21 I2C_SDA Data pin for I2C 22 SPI SCK Clock pin for SPI 23 SPL MISO Master In Slave out for SPI output 24 SPI MOSI Master Out Slave In for SPI input 25 RTXC2 Pin 2 for 32 768 KHz oscillator Optional for RTC with backup battery 26 RTCK Do not connect 27 DBGSEL Do not connect 28 SPI SSEL Slave Select for SPI input 31 VSSA Analog Ground 36 CD_SSEL SD card signal 21 MISC A miscellaneous pin Functionality will be determined in special releases GHI Electronics LLC 5 User Manual uALFAT File System Made Easy Pin Name Description 42 VCC 3 3V Power source 43 VSS Ground 44 SD_SCK SD card signal This pin must be high when RESET is BL low Also when sending deep sleep command a toggle WAKE on this pin will wake up uALFAT All pins that are not listed in the table above must be left unconnected Always consult uALFAT SD schematics 3 Boot Loader 3 1 General description The boot loader is used to update the firmware of uALFAT When there is a new firmware release you can simply download the file from our website and using simple commands uALFAT can update itself At power up uALFAT will send 2 characters and L indicating that the boot loader is ready to load new file To exit the boot loader and start uALFAT firmware send R character
6. R 0 4 ERROR READ MODE REQUIRED 0 4 ERROR END OF DIR LIST Ox4E ERROR FILE PARAMETERS Ox4F ERROR INVALID HANDLE 0x61 ERROR COMMANDER BAD COMMAND 0x62 ERROR COMMANDER STR LEN TOO LONG 0x63 ERROR COMMANDER NAME NOT VALID 0x64 ERROR COMMANDER NUMBER INVALID 0x65 ERROR COMMANDER WRITE PARTIAL FAILURE 0x66 ERROR COMMANDER UNKNOWN MEDIA LETTER 0x67 ERROR COMMANDER FAILED TO OPEN MEDIA 0x68 ERROR COMMANDER INCORRECT CMD PARAMETER ERROR COMMANDER UNKNOWN _ ERROR GHI Electronics LLC 16 User Manual uALFAT File System Made Easy 8 Power Modes In some applications power consumption is very critical uALFAT is designed with low power in mind Although you can completely shut off uALFAT s power for zero power consumption some user may prefer to put uALFAT to sleep instead of power off to keep the file handles open Also uALFAT can run at 2 different speeds uALFAT oscillator is 10 MHz When executing the boot loader or the firmware uALFAT runs in reduced power mode In this mode uALFAT draws about 8mA including 1 8V regulator If high performance is required you can run uALFAT at full power where the core runs at 70 MHz In this mode the complete uALFAT SD board draws about 38mA Hibernation is also another option If the system doesn t need and file operations uALFAT can hibernate and the core draws about 10uA Keep in mind that regulators have their own current draw and a minimum draw uALFA
7. Read UART Baud Rate divider section below Enable Echo 1 to enable and 0 to disable 1 Always disable echo for speed and when using SPI and I2C Media None K Can take a bit of time Statistics depending on the media size 7 Sleep F for full Read Power Modes section R for reduced for more details H for hibernate T Init time B for backup and S for shared TS 5 Set Time and DWORD hex Time amp Date Not fully implemented yet Date structure G Get current X for hex Time amp Date structure GF Displays the current time Time and and F for formatted Date Read sector SectorNumber 1234 Sector size is always 512 bytes Write sector SectorNumber 1234 Use only if you know what you are doing File Attributes are one byte Standard Attribute Structure in FAT system File attributes ATTR_READ_ONLY ATTR_HIDDEN ATTR_SYSTEM ATTR_VOLUME_ID ATTR DIRECTORY ATTR ARCHIVE 0x01 0x02 0x04 0x08 0x10 0x20 Time amp Date DWORD structure struct FATtime WORD Second2 5 32 bits WORD Minute 6 0 59 WORD Hour 5 0 23 WORD 5 1231 WORD Month 4 1 12 WORD Year1980 7 GHI Electronics LLC Years since 1980 11 seconds divided by 2 0 30 User Manual uALFAT File System Made Easy 5 1 UART Baud Rate uALFAT contains a fancy divider for baud rate Using the divider we can set the UART to almost any possible baud rate Below is a table with some standard baud rates Note
8. SPI_SSEL SPI 5 Interface 0 0 UART 0 1 Skip boot loader 1 0 I2C 1 1 SPI Do not use 4 1 UART Interface In UART interface mode UART_TX pin is used to send data to your microcontroller and UART_RX pin to receive commands from your microcontroller The default baud rate for UART is 9600 Always use 8 bit with no parity and 1 stop bit Baud rate is changeable through BR command CTS and RTS lines must be used to insure not loss of data at high speeds CTS pin 15 an input to uALFAT and when it is high uALFAT will not send data and will wait for it to go low CTS should be high as long as possible to not slow down uALFAT RTS pin is output from uALFAT and it is set high when uALFAT FIFO is full Depending on data transfer speed RTS pin may never go high because uALFAT is contentiously emptying the FIFO Note The internal UART have a hardware TX FIFO that is 16 byte long After asserting CTS uALFAT may still send the internal FIFO up to 16 bytes Important uALFAT will NOT send any data if CTS pin is high If this pin is not used then it must be connected to ground 4 2 SPI Interface Mode In SPI mode six pins are used for communication to implement slave SPI Two pins are used for handshaking SPI SSEL SPI SCK SPI MISO and SPI MOSI are the standard SPI pins where SSEL is used for Slave Select SCK is the Serial Clock MISO is the data line going from uALFAT to your microcontroller and MOSI is the data line g
9. T SD board draws 1mA when in hibernate The command to change the power mode 15 Z When changing the clock speed you have to keep many things in mind For example the SPI clock can be the system clock divided by 8 maximum So if the system is in reduced power mode running at 10 MHz the SPI SCK can be 1 25 MHz maximum Also the UART baud rate needs to be adjusted to hold the correct divider value Look at UART Baud Rate section for more details on the divider values ZF gt DCEF switch to run at 70 MHz and set the UART baud rate to 9600 7 R gt IFAB lt set the system to run at 10 MHz and baud rate of 9600 Now what if we are using SPI or I2C interfaces Even in this case you are required to set the UART divider and you can use any one of the values When uALFAT goes in hibernation mode it can be woken up by toggling the WAKE pin This in is multi purpose and must always be left disconnected from your system except when there is a need to wake uALFAT This be accomplished by setting the pin of your micro that connects to WAKE to be input When there is a need to wake uALFAT set your pin to low then make the pin output wit for few micro seconds and then set the pin back to input GHI Electronics LLC 17 User Manual uALFAT File System Made Easy 9 Power and Oscillator 10 11 uALFAT is very simple to add to your new or existing designs it requires very few components Two voltages are needed 3 3V and
10. conditional license of use from GHI Electronics LLC There are many patented technologies utilized in uALFAT that must be account for e The SD card is used in MMC compatibility mode therefore no license is required from the SD organization e FAT file system is a patent of Microsoft Corporation Licensing fee for using FAT file system must be paid by companies who wish to use FAT file system in their products For more information visit Microsoft s website http www microsoft com mscorp ip tech fat asp GHI Electronics LLC provides a technology that allows users to read and write raw sectors and read and write FAT files If FAT functions are used by uALFAT users then they must contact Microsoft for licensing GHI Electronics LLC should be liable for any unpaid licenses Copyright GHI Electronics LLC Trademarks are owned by their respective companies ALFAT nhALFAT ALFATxp USBizi and USBwiz are trademarks of GHI Electronics LLC DISCLAIMER IN NO EVENT SHALL ELECTRONICS LLC OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES INCLUDING BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE DATA OR PROFITS OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT IABILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE
11. erminated by a checksum byte Checksum byte is calculated by adding all 512 data bytes V Returns the loader version Returned value is ASCII Note The boot loader is entirely separate program that loads uALFAT firmware The version number of the boot loader may not mach the version number of uALFAT New uALFAT chips come with no firmware loaded and must load the latest firmware available on our website 3 4 Communication Interfaces in boot Loader The boot loader runs simpler drivers for UART SPI and I2C All drivers run in pooled mode Also there are few things to keeping mind 1 The processor runs at 10 MHz always 2 SPI clock has to be lower than 1 25 MHz 3 SPI driver is half duplex 3 5 Boot Loader Error Codes The boot loader error codes are same as UALFAT error codes with the addition of the following OxD1 ERROR FLAHS NOT BLANK 0xD2 ERROR VERIFY 0xD3 INTERNAL 0 4 ERROR CHECKSUM 0 7 ERROR INVALID 0xD8 ERROR COMMAND 0xDA ERROR FILE IS EMPTY ERROR FILE NOT FOUND 0 ERROR UNKNOWN _ COMMAND GHI Electronics LLC 7 User Manual 4 uALFAT Interfaces uALFAT File System Made Easy uALFAT uses UART I2C or SPI to communicate with any external microcontroller At power up uALFAT samples SPI SSEL and SPI SCK pins to determine what interface to use The following table describes the states
12. ew external components 10 bit ADC RTC Real Clock Time capable of running of external battery Low power consumption about 8mA Sleep mode 10uA All I O pins are 5 volt tolerant Small surface mount package LQFP 48 pin 40 C to 85 C temperature operating range Lead free Some Example Applications Digital cameras Printers Digital picture viewer MP3 players Data logger Automated machines GHI Electronics LLC 4 User Manual uALFAT File System Made Easy 2 Pin Out and Description Pin Name Description 1 SD_MISO SD card signal 2 SD_MOSI SD card signal 4 VBAT Power source for the internal RTC Connect to 3V battery or VCC Always use 2 diodes to connect a battery and VCC in case the battery runs out of power 5 VDD 1 8V 1 8V power source 6 RESET uALFAT reset signal 7 VSS Ground 8 TRST Do not connect 9 TMS Do not connect 10 TCK Do not connect 11 Pin 1 for 10 MHz oscillator 12 2 Pin 2 for 10 MHz oscillator 13 UART TX UART mode Transmit pin of UART output SPI DATARDY SPI and I2C modes When high it signals that I2C_DATARDY uALFAT wants to send some data and the host must read it 14 UART_RX Receive pin of UART input SPI BUSY SPI and I2C When high it signals that uALFAT 15 I2C_BUSY being busy and not ready for new data 15 TDI Do not connect 16 TDO Do not connect 17 VCC 3 3V power source 18
13. le handles Keep in mind that all values here are ASCII based so when you need to send 0 to uALFAT you will have to press 0 key on keyboard but when sending it through external microcontroller you would have to end ASCII 0 which is 0x30 hexadecimal When sending data to the opened file data can be anything ASCII or binary Handles are used for fast access to a file If a user needs to log data to 2 files at the same time VOLTAGE LOG and CURRENT LOG file handles become very use full GHI Electronics LLC 13 User Manual uALFAT File System Made Easy To do so open VOLTAGE LOG under handle 1 and CURRENT LOG under handle 2 Now start sending your data to handle 1 and 2 instead to the file name To open a file use O 1W VOLTAGE LOG The previous command will create new file at the current directory with name VOLTAGE LOG and the file handle is 7 Now to save data to that file use W 1 gt 10 Now the W will write data to a file that is open at handle 1 and will write 16 bytes 10 hexadecimal 16 decimal to it After sending carriage return enter uALFAT will return 00 This indicates that uALFAT is ready for your data Now start sending your 16 byte of data When 16 bytes are sent uALFAT will return another error code Note All numbers given to uALFAT commands are hexadecimal numbers This is an example session gt M LOG DATA 100 gt A LOG 100 gt O 1W gt VOLTAGE LOG 100 crea
14. oing from your microcontroller to uALFAT The Handshaking lines are SPI DATARDY and SPI BUSY When uALFAT has data to send to the PC it raises DATARDY line The host SPI master must read the data from uALFAT as fast as possible Data and commands can be sent to uALFAT at any time except when SPI_BUSY is high GHI Electronics LLC 8 User Manual uALFAT File System Made Easy In the nature of SPI the data flow is full duplex On every SPI transaction a data is swapped between the master your system and the slave uUALFAT This is great until you need to read data from uALFAT but you don t want to send a command uALFAT implements a software mechanism to handle this issue Two special numbers are used to handle the flow control OxFF and we will call it NDT No Data Token and OxFE and will call it HDT Half Data Token Whenever uALFAT SPI sees NDT again it is OxFF it will ignore it This allows you to read uALFAT without sending data Of course you are sending NDT but it will be ignored by uALFAT SPI driver This is everything you need to do if you are using numbers from 0 to OxFD Usually this is good in most cases as uALFAT commands are ASCII based and most users save files as ASCII text If you need to send OxFF to uALFAT you have to send HDT followed by NDT uALFAT will understand this as real OxFF number and will not ignore it For OxFE you have to send HDT followed by HDT Here is a simple example in C language on how
15. onics LLC 15 User Manual uALFAT File System Made Easy 7 UALFAT Error Codes All Commands return with prompt or with error codes Error Number Description 0x00 No Error 0x01 ERROR READ SECTOR 0x02 ERROR WRITE SECTOR 0x03 ERROR ERASE SECTOR 0x11 ERROR SIGNATURE MISSMATCH 0x12 ERROR BS SIGNATURE MISSMATCH 0x13 ERROR SECTOR SIZE NOT 512 0x14 ERROR FSINFO SIGNATURE MISSMATCH 0x21 ERROR CLUSTER OVER RANGE 0x22 ERROR CLUSTER UNDER RANGE 0x23 ERROR NEXT CLUSTER VALUE OVER RANGE 0x24 ERROR NEXT CLUSTER VALUE UNDER RANGE 0x25 ERROR NO FREE CLUSTERS 0x31 ERROR FILE NAME FORBIDDEN CHAR 0x32 ERROR FILE NAME DIR NAME OVER 8 0x33 ERROR FILE NAME DIR EXTENSION OVER 3 0x34 ERROR FILE NAME FIRST CHAR ZERO 0x35 ERROR MEDIA FULL 0x40 DIR_ ENT FOUND 0x41 DIR_ ENT FOUND 0x42 ERROR FOLDER IS CORRUPTED FIRST CLUSTER 0x43 ERROR FOLDER IS CORRUPTED DIR DOT NOT FOUND 0x44 ERROR FOLDER 15 CORRUPTED DIR DOTDOT FOUND 0x45 ERROR ROOT DIRECTORY IS FULL 0x46 ERROR OPEN FOLDER FILE 0x47 ERROR WRTIE TO READ MODE FILE 0x48 ERROR SEEK REQUIER READ MODE 0x49 ERROR INVALID SEEK POINTER 4 ERROR FOLDER EMPTY 0 4 ERROR IS FOLDE
16. s directory Make new Folder Name string M MYFOLDER Folder must not exist directory E Erase an Folder Name string MYFOLDER Folder must exist empty directory O Open File filehandle Openmode gt filename Openmode 1 Open to Read only OR gt TEST TXT 2 W Open new file to O 1W gt TEST2 TXT write 3 AOpen to write data O3A gt DATA LOG starting from the end of existing file Close file Filehande C2 Always close when done handle writing F Flush File Filehandle Fl Flush guarantees the data is on the SD card D Delete file Filename D test txt W Writes data to Filehand gt datasize W B gt 4D Must open file for write an open file Datasize 1 FFFFFFFF first bytes R Read data FilehandleFiller gt datasize R 07 gt 8 Must open file for read first from open Datasize 1 FFFFFFFF file bytes Seek read file Filehande gt newposition 0 gt FFA3 This function works on files pointer newposition is a hex number open for read only 0 filesize 1 Initialize the none file entry pointer N Get next file none Use command first 9 Get File Filename file txt Information V Version None V number Q Quick Format Confirming string which is Q CONFIRM Memory cards must be CONFIRM FORMAT FORMAT formatted on a PC first GHI Electronics LLC 10 User Manual uALFAT File System Made Easy CMD Usage Parameters Example Notes B Set baud rate Divider value B 1234
17. tails Follow BL by R and you should get the following No carriage return is needed GHI Electronics LLC uALFAT TM GHI Electronics LLC 12 User Manual uALFAT File System Made Easy gt The gt prompt means that uALFAT is ready to take commands uALFAT can connect to two kinds of media types SD and MMC cards To initialize the media use the I initialize command followed by carriage return uALFAT doesn t detect card removal or replacement The final application must detect card removal Also uALFAT doesn t check the protection switch on SD cards This means uALFAT will write on protected cards No harm will be caused to the card if removed as long as no files were open for write For step by step on how to use the commands consult uALFAT Tutorial 6 1 Directories Folders Folders are fully supported by uALFAT uALFAT doesn t display what folder it is accessing but it will keep track of the folders internally UALFAT this command will create UALFAT folder 6 2 Files Files can be opened for read write or append Opening a file for read requires that the file exists on the media Opening a file for write requires that the file doesn t exist on the media or it will be overwrited Opening a file to append data to it will add data to a file if it exists If the file doesn t exist then new file will be made With uALFAT you can open up to 4 files at the same time using fi
18. te new directory change directory create new file for write inside LOG_DATA folder gt O 2W gt CURRENT LOG create new file for write inside LOG_DATA folder 100 gt W 1 gt 7 lt command to write 7 bytes characters to at handle 1 100 lt uALFAT accepted the write command 12 123V enter the data to go to the file 100 lt data written successfully gt W 7 gt A writes 10 bytes to file at handle 7 100 lt uALFAT accepted the write command 1234567890 enter your data 100 data written successfully W 1 gt 7 add 7 bytes characters to file at handle 1 100 uALFAT accepted the write command 10 194V enter the data to go to the file 100 lt data written successfully gt uALFAT is ready for more commands Note file names must not contain its path i e sub1 file txt Only pure names are allowed i e file txt Note2 Folders and files use naming convention that is same of DOS naming convention Names must be 8 characters or less and 3 characters or less for the extension and they must be upper case All upper case letters numbers and underscore be used for names and extensions Example DATA LOG NOEXT FOLDER NO_SPACE TXT 12345678 123 FOLDER 123 GHI Electronics LLC 14 User Manual uALFAT File System Made Easy If an error occurred uALFAT returns the symbol followed by the error number GHI Electr
19. that the values do not work in boot loader Always run boot loader at default 9600 and after firmware execution change the baud rate The table contains two sets of divider values at 10 MHz and 70 MHz Use the 70 MHz when run in full power mode and the 10 MHz when running reduced power mode Baud Rate Divider at 70 MHz Divider at 10 MHz 9600 DCEF 1FAB 119200 6EEF 0386 38400 37EF 067C 57600 43F2 08 5 115200 1EF4 04 5 230400 OFF4 02 5 460800 05 9 01 5 921600 028B Not possible For example 1EF4 will set the baud rate to 115200 when using full power mode uALFAT responds with 00 if command is accepted at the old baud rate and then it changes the baud rate You will then receive a second 00 at the new baud rate 6 Getting Started All commands are text based User can use a terminal program to type in the commands if using a PC and RS323 level converter Also any microcontroller can send commands to write read files folders NOTE Each line is terminated by carriage return only to make parsing easier If you use Hyper Terminal or similar program you have to configure it to append LF to each CR In Hyper terminal you will find it at gt Settings gt ASCII Setup Append Line Feed Important uALFAT doesn t echo back the data by default Use 1 command to enable echo if needed At power up uALFAT will send BL Read boot loader section for more de
20. tible with PCs many other companies developed their own FAT code for different applications such as digital cameras There are three versions of FAT file system FAT12 FAT16 and FAT32 1 2 Adding File System to Your Products Adding a file system such as FAT to a product can cost a company thousands of dollars A reliable FAT stack source code costs between 4 000 and 10 000 That is not all FAT is useless without driver for the connected media an SD card for example Understanding the media porting compiling and linking are also other complicated steps Our own research shows that adding a file system to a product would take about 6 months or cost about 10 000 1 3 uALFAT in general uALFAT is a full FAT file system on a chip uALFAT requires very few external components to run For communication a simple microcontroller PIC AVR basic stamp etc with UART SPI or I2C can be used GHI Electronics LLC 3 User Manual uALFAT File System Made Easy 1 4 1 5 Features FAT12 FAT16 and FAT32 support Runs UART SPI or 12 Programmable UART serial port bud rate Can open 4 files at the same time using file handles Fast startup and media reconnect Fast file write average 60Kbytes Sec Supports Secure Digital SD and Multi Media Card MMC No SD license is required Field upgradeable firmware through UART SPI or I2C Field upgradeable firmware through a file on the connected media Very f
21. uALFAT File System Made Eas uALFAT User Manual Revision 1 10 GHI Electronics LLC www ghielectronics com Updated 8 2006 GHI Electronics LLC 1 User uALFAT File System Made Easy Table of Contents 3 Peles AFAT Filesystem E A E aus 3 1 2 Adding File System to Your Products 3 1222 3 1242 4 1 5 Some Example Applications 4 2 Pin Out 5 3 6 SS General descmptl On dudes 6 2222 aTe E E 6 2 5 7 3 4 Communication Interfaces boot 7 3 92 2 tun ea tomas eae nomena 7 4 ADA AP i 8 bs UART Interface wis te alan ot tive 8 4 2 SPiInterface 8 4 3 BG Interface MOUS 9 Commands
22. your transmit routine should work SendData char c 0 SendSPI OxFE SendSPI c If pooling is preferred it is possible to keep pooling uALFAT not check DATARDY pin at all When there is no data uALFAT will return NDT OxFF Important uALFAT requires the following in order for SPI to work SCK is output from your system SCK is idle High e SCK is slower than 8 MHz in full power mode and slower than 1 25 in rediced power mode e Data is shifted out MSB first e Data is latched on the rising edge of SCK 4 3 12C Interface Mode Four pins are needed for I2C communication The USER 2 and USER I2C_SDA are the two I2C bus lines I2C_DATARDY and I2C_BUSY lines work exactly the same way as SPI DATARDY SPI BUSY work except the interface is half duplex When DATARDY is high you can t send data to uALFAT until all the data is read and DATARDY is back low uALFAT runs in slave I2C mode always The slave address of uALFAT is 0xA4 This address is fixed and can t be changed GHI Electronics LLC 9 User Manual uALFAT File System Made Easy 5 Commands Structure uALFAT implements a very simple commands structure Commands are one character The following table is a complete listing of the commands CMD Usage Parameters Example Notes A Change Folder Name string A MYFOLDER Folder must exist acces
Download Pdf Manuals
Related Search
Related Contents
Jet Cast Iron User Manual 150428005 MANUAL USUARIO ALM PEUGEOT 206 Transformer Rough-In Box Installation Whirlpool 20RI-D4 ESPRESSO side-by-side refrigerator Porter-Cable FRP350 User's Manual P7 - P 4.5 - Garajes Prefabricados SAS Murelle EV HE -IT User manual Copyright © All rights reserved.
Failed to retrieve file