SCL Reference: accessin() Function

The SCL accessin() function assigns a data file to an SFR.

accessin(filename,     // filename (String)
         mode,         // data format
         sfr,          // sfr to receive file data
         rewind);      // true => reuse file data after eof

accessin("C:/MyProj/MyData.dat", hex_mode, RXB0D0, true);

This method injects the data in the file to the SFR. The injections occur "on demand". Specifically the injection occurs each time the processor reads the sfr. For example

movf     RXB0D0, W    // execution causes injection of next
                      // file data value to the RXB0D0 register

The filename must have a complete absolute pathname. We expect to have this fixed in a future release.

The mode specifies the format of the data in the file. It can be one of the following values:

binary_mode       // non text numeric data (64 bits per word)
dec_mode          // text dec:  13 156
formatted_mode    // text variable format
                  //            #16#0FE3#
                  //            #10#136#
                  //            B"010011"
                  //            O"70534""
                  //            X"3F5"
hex_mode          // text hex:  064 FE3

The sfr is just the Special Function Register that will receive the injection values.

rewind determines if register injection will start over from the file beginning once all the file data has been consumed.

© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.