avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Off topic question - 3 1/2 PC Floppy drive


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Off topic question - 3 1/2 PC Floppy drive
Date: Mon, 1 Jul 2002 10:56:24 +0200 (MET DST)

Marek Michalkiewicz <address@hidden> wrote:

> You would need a floppy controller chip, and these are quite hard to
> program, especially as AVR has no DMA controller, so you have to read
> the data quickly or it will be lost, and the 8535 has no external
> address/data bus, and emulating that in software is slow...

Like others, i also think that not having DMA available is probably
the smallest problem.  Timing for non-DMA mode used to be tough on 2.5
MHz Z80s -- for standard DD floppies, one byte each 16 µs.  My CP/M
BIOS on the 2.5 MHz Z80 required about 13 µs per cycle...  OK, these
days one also wants HD, but given the good speed the AVRs offer,
that's not much of a problem either.

But what's much worse is that the old NE765 register interface is just
terrible.  The C source code of FreeBSD's floppy controller driver
(which i'm supposed to maintain :) is > 60 KB now.  Even though one
probably doesn't need all the functionality of it in an embedded
system, it's a tremendous amount of work to build a driver, so you
need a large controller not only due to RAM and bus interface
requirements, but also due to code size.

Unlike others, i think all the recent floppy controller chips most
likely still do support non-DMA mode.  What you need however is a chip
that can interface to a dumb bus (i. e. like an old ISA bus).  Chips
that can only interface to PCI are pretty useless in a microcontroller
environment.  For example, i've just read the datasheet of the Natsemi
PC87317, this one seems to be hooked to the ISA bus.  Well, if you use
it (and are willing to handle the PQFP 160 case ;-) and the 32 mA
supply current it requires), you also get an interface to a keyboard,
a parallel port, an RTC, and a couple of UARTs in return. :)

Other vendors seem to offer similar chips.  SMC's FDC37C669 offers
about the same, also interfaces to the ISA bus, and even includes an
IDE interface.  I don't read a statement about the power supply
requirements in the datasheet though.

Given that designs like Ethernut have successfully interfaces ISA-bus
Ethernet chips to the AVR, i don't think all this is totally
unreasonable; it's just a huge piece of work to get it done.

If this is not for a product to be sold but for hobby purposes, one
can easily unsolder chips like the SMC one from old PC mainboards.

If someone's going to really implement it, and has questions regarding
the scary details of the NE765-like floppy controller handling, feel
free to ask me.
-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/
avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]