Download mikroPascal for AVR Users Manual

Transcript
mikroPASCAL
making it simple...
mikroPASCAL - Pascal Compiler for Atmel AVR microcontrollers
Cf_Fat_Init
Prototype
procedure Cf_Fat_Init(var control_port: byte; wr, rd, a2, a1, a0,
ry, ce, cd : byte; var data_port : byte);
Returns
“1” if card is present, “0” if card is not present
Description
Initializes ports appropriately for FAT operations with CF card. Specify two different
ports: ctrlport and dataport. wr, rd, a2, a1, a0, ry, ce and cd are pin nummbers on control
port.
Requires
Nothing.
Example
CF_Fat_Init(PORTD,6,5,2,1,0,7,3,4, PORTC);
Cf_Fat_Assign
Prototype
function Cf_Fat_Assign(var filename : array[12] of char,
create_file : byte): byte;
Description
Assigns file for FAT operations. If file isn't present, function creates new file with given
filename. filename parameter is filename of file. create_file is a parameter for creating
new files. if create_file if different from 0 then new file is created (if there is no file
with given filename).
Requires
Ports must be initialized for FAT operations with CF. See Cf_Fat_Init.
Example
Cf_Fat_Assign('MIKROELE.TXT',1);
Cf_Fat_Reset
Prototype
procedure Cf_Fat_Reset(var size : longint);
Description
Opens file for reading. size is size of file in bytes.
Requires
CF must be initialized. See Cf_Fat_Init. File must be assigned. See Cf_Fat_Assign.
Example
Cf_Fat_Reset(size);
page
mikroElektronika: Development tools - Books - Compilers
111