Download mikroPASCAL - PIC Vietnam
Transcript
mikroPASCAL making it simple... mikroPASCAL - Pascal Compiler for Microchip PIC microcontrollers CF_INIT_PORT Prototype: procedure CF_INIT_PORT(var CtrlPort : byte, var DataPort : byte ); Precondition: None. Parameters: CtrlPort is control port, DataPort is data port to which CF is attached. Effects: Initializes ports appropriately. CF_DETECT Prototype: function CF_DETECT(var CtrlPort : byte) : byte; Precondition: CtrlPort must be initialized (call CF_INIT_PORT first). Parameters: Check for presence of CF. Effects: Returns TRUE if CF is present, otherwise returns FALSE. CF_WRITE_INIT Prototype: procedure CF_WRITE_INIT(var CtrlPort : byte; var DataPort : byte; Adr : longint; SectCnt : byte); Precondition: Ports must be initialized. Parameters: CtrlPort - control port , DataPort - data port , Adr - specifies sector address from where data will be written, SectCnt - parameter is total number of sectors prepared for write. Effects: This procedure initializes CF card for write operation. page MikroElektronika: Development tools - Books - Compilers 137