Full Version : FAT Floppy Dirve Interface (AVR ASM)
avr >>TECHNICAL & HARDWARE >>FAT Floppy Dirve Interface (AVR ASM)


AVR_Admin- 05-08-2006
The TI-74 floppy disk interface

The goal of this project is a floppy disk interface for the Texas Instruments TI-74 programmable calculator. It should be able to use standard 3.5'' 1.44MB floppy disks with Microsoft FAT compatible data format. The interface should be built with a single chip microcontroller without using any dedicated floppy controller and/or data separator. The MFM encoding and decoding should be done entirely in software.

Hardware

When designing the circuit I have tried to move as many tasks as possible to hardware. Choice of microcontroller pins:

Read Data goes to the pin supporting Input Capture function.
Write Data goes to the pin supporting Output Compare function.
The microcontroller should issue pulses on the Step line to move the head. This process is neither time critical nor fast, but I have chosen another Output Compare pin for this function, just for a case.
HSK and BAV hexbus signals go to interrupt inputs.
The tests proved that the microprocessor can precisely generate waveforms and measure distance between pulses, both functions with resolution of 62.5ns and very small CPU overhead.

In the current software version only the floppy disk controller part is fully implemented. The file system and the hexbus interface procedures have yet to be written.

Writing data to the disk was implemented without any compromise, write precompensation and all.

Implementing a software equivalent of a phase locked loop to separate read data proved to be too much time consuming. I have considered using an external data separator (for example the FDC9216), but finally decided to do everything in software. The program simply measures distance between the read pulses. This method proved to be very reliable, though not as immune to rotation speed fluctuations as PLL.

The program tests the floppy controller functions. It writes some fixed text to sector 34, then reads sectors 33 and 34, and sends their contents as text through the serial port (data on a PC formatted 1.44M floppy disk start at sector 33).

How to test the program:

Save some text file (using your PC) on a newly formatted floppy disk.
Remove the floppy disk from the PC and insert it to the drive connected to the interface.
Apply Reset - the interface will write new data to sector 34.
Insert the floppy disk back to the PC and examine the file - 512 bytes of text starting at offset 512 should be replaced with data written by the interface.

Link to Project: http://www.pisi.com.pl/piotr433/fde.htm


Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.