Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/18/03 08:49
Read: times


 
#48684 - RE: floppy disk interface
Responding to: ???'s previous message
http://www.c51.de
In 1999 as part of the CD zum C51- book code and projects there was an example of using the FDC37C669C Floppycontroller ,based on the Keil MCB517AC evaluation board..

The code is no longer on the site ,but it you contact the author he may be able to provide/sell/sell you a book etc..
below are the subroutines declarations used..




// ***** some global defines *****
#define FORMATPATTERN 0xff
#define DISKSELECT0 0x00
#define DISKSELECT1 0x00
#define SPECSECTSIZE 0xff
#define ENDOFTRACK 0x12
#define HDLOADTIME 0x26
#define HDUNLOADTIME 0x26
#define SECTORSIZE 0x02
#define STEPRATE 0x08
// ***** definition of structures *****
struct POS {
ucCyl; // cylinder address
ucHead; // head, selects disk side 0 or 1
ucSec; // sector address or number of sectors
ucSize; // sector size
} stPosition;
struct STAT {
ucStat0; // status byte 0
ucStat1; // status byte 1
ucStat2; // status byte 2
ucStat3; // status byte 3
} stStatus;
// ***** low level routines *****
extern bool FDC_Initialize(void);
extern bool FDC_Specify(...);
extern bool FDC_Configure(...);
extern bool FDC_ReadData(uchar * ucBuffer);
extern bool FDC_WriteData(uchar * ucBuffer);
extern bool FDC_ReadDelData(uchar * ucBuffer);
extern bool FDC_WriteDelData(uchar * ucBuffer);
extern bool FDC_Verify(void);
extern bool FDC_FormatTrack(POS * stTrack);
extern void FDC_Recalibrate();
extern bool FDC_SenseInterruptStatus(&ucCurrentCylinder);
extern bool FDC_SenseDriveStatus(void);
extern bool FDC_Seek(ucNewCylinder);
extern bool FDC_SeekRelative(ucCylinderOffset, bit btDirection);
extern bool FDC_DumpReg(&ucBuffer);
extern bool FDC_ReadID(void);

List of 7 messages in thread
TopicAuthorDate
floppy disk interface            01/01/70 00:00      
   RE: floppy disk interface            01/01/70 00:00      
   RE: floppy disk interface            01/01/70 00:00      
   RE: floppy disk interface            01/01/70 00:00      
      RE: floppy disk interface            01/01/70 00:00      
      RE: floppy disk interface            01/01/70 00:00      
         RE: floppy disk interface            01/01/70 00:00      

Back to Subject List