Datasheet

206
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Requires
- CF_A1 : Address pin 1
- CF_A0 : Address pin 0
- CF_Data_Port_direction : Direction of the Compact Flash data direction port
-
CF_RDY_direction : Direction of the Ready pin
- CF_WE_direction : Direction of the Write enable pin
- CF_OE_direction : Direction of the Output enable pin
-
CF_CD1_direction : Direction of the Chip detect pin
- CF_CE1_direction : Direction of the Chip enable pin
- CF_A2_direction : Direction of the Address 2 pin
-
CF_A1_direction : Direction of the Address 1 pin
- CF_A0_direction : Direction of the Address 0 pin
must be defined before using this function.
Example
// set compact flash pinout
var CF_Data_Port : byte at PORTD;
var Cf_Data_Port_Direction : byte at DDRD;
var CF_RDY : sbit at PINB.B7;
var CF_WE : sbit at PORTB.B6;
var CF_OE : sbit at PORTB.B5;
var CF_CD1 : sbit at PINB.B4;
var CF_CE1 : sbit at PORTB.B3;
var CF_A2 : sbit at PORTB.B2;
var CF_A1 : sbit at PORTB.B1;
var CF_A0 : sbit at PORTB.B0;
var CF_RDY_direction : sbit at DDRB.B7;
var CF_WE_direction : sbit at DDRB.B6;
var CF_OE_direction : sbit at DDRB.B5;
var CF_CD1_direction : sbit at DDRB.B4;
var CF_CE1_direction : sbit at DDRB.B3;
var CF_A2_direction : sbit at DDRB.B2;
var CF_A1_direction : sbit at DDRB.B1;
var CF_A0_direction : sbit at DDRB.B0;
// end of cf pinout
// Init CF
begin
Cf_Init();
end;