Using a PIC as a floppy disk controller

I never got into the Commie stuff, although I wound up with a keyboard and drive as part of a job lot.

Reply to
Homer J Simpson
Loading thread data ...

The 1541 used the 28-pin version of the WD1771.

It did _not_ use GCR.

Reply to
Donald

Sorry,

formatting link

Reply to
Donald

That serial interface was Commodore's serial version of the IEEE-488 buss, including assigning device numbers to the drives, from 8 to 11. The 1540/1541 used a standard single sided 5 1/4" Newtronics floppy disk drive, less the OEM circuit board. I repaired over 100 of those drives over a 15 year period. Most of the time all it took was a single drop of teflon oil into each bearing, then check the speed. I think that I still have the schematic, somewhere.

The 1581 drive used a WD FDC and a common 720K double sided 3.5" Floppy drive, but the controller didn't like some drives because they didn't provide a "Disk Change" output.

One of the coolest things about the 1541 drive was software that could be loaded into the onboard RAM of one 1541, plug in a second 1541 and load software into it. Then you unplugged the pair of drives from the computer, leaving a serial cable between the drives. Then all you had to do was put in a disk in drive "8" and copy it to drive "9". You had about two seconds to shove the disks in and close the collet before the copy started. Then, you could copy disks this way till the power was turned off.

--
Service to my country? Been there, Done that, and I\'ve got my DD214 to
prove it.
Member of DAV #85.

Michael A. Terrell
Central Florida
Reply to
Michael A. Terrell

Hi Donald,

Ah, my mistake. Sorry about that, and thank you for the clarification.

Reply to
Joel Kolstad

I guess I retract my apology? :-)

Reply to
Joel Kolstad

Which i was part of writing at one time! :)

--
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
Reply to
Jamie

Hi Michael,

Thanks for the additional detail... the Wikipedia article also mentions that it was due to an removal of an extra two traces (that were mistakenly thought to be redundant) on the C-64 that the bus was about 10x slower than originally planned.

I'd hate to be the guy who had that on his resume... oops!

Reply to
Joel Kolstad

More like 100 MHz. The data rate is 2 uSec per bit, but for the data seperator to sync up, (given the sloppy timing spec of 5 or 10 percent for a disk written by any old drive that starts and stops disk rotation), you need resolution of, SWAG, about 10 nanoseconds unless you can stick some analog timing in there.

But isn't that group coded? MFM makes it worse.

Mark Zenier snipped-for-privacy@eskimo.com Googleproofaddress(account:mzenier provider:eskimo domain:com)

Reply to
Mark Zenier

I'd like to know what they were supposed to have removed. The serial bus was developed for the VIC 20, years before they designed the first model of C64 line. Both used the same six wire cable and signals. In fact, there was a software change to the 1541 drive to make it work better with the c64. The 1540 was built for the VIC 20. The VIC 20 and could work with either drive, but a little slower. Considering the 1 MHz clock rate at both ends, just how fast do they think the serial bus would be, anyway. That sounds like another myth.

i wonder how many people know that the roms still had the routines for a dual drive, and for two sided drives, but without any links to access them. It looks like they modified the code from their model 8050 IEEE-488 dual floppy drive to their serial buss and changed a couple pointers to disconnect the unused routines.

--
Service to my country? Been there, Done that, and I\'ve got my DD214 to
prove it.
Member of DAV #85.

Michael A. Terrell
Central Florida
Reply to
Michael A. Terrell

Hi Michael,

Could be. My guess would be that they had intended for some of the bus signals to go to, I dunno, some clock input line on the 6526 or similar (didn't the VIC have a bunch simpler CIA?) such that hardware could have clocked in the bits.

The 1571 still used the same cables, didn't it? (I never had one...)

Even with the 1MHz CPUs, some of those faster loaders seemed to achieve a very reliable 5x speed-up... even more if you'd saved the file from the same fast loader so that the interleave was optimal. Quite impressive.

Oh yeah... now that you mention it, I vaguely remember reading about that in Inside Commodore DOS!

---Joel

Reply to
Joel Kolstad

The VIC 20 used the standard MOS Technology 6522 "Versatile Interface Adapter" chip.

The 1571, the never released 1572 dual, double sided drive, and the

1581 3.5" drive all used the same cable and interface as the older drives.

Wasn't part of the speedup from turning off some other functions during drive access, and removing part of the verification process?

I think that I still have two copies of that book.

Do you remember "Jiffy DOS", with the toggle switch to select normal or fast drive access routines?

--
Service to my country? Been there, Done that, and I\'ve got my DD214 to
prove it.
Member of DAV #85.

Michael A. Terrell
Central Florida
Reply to
Michael A. Terrell

formatting link

Reply to
Donald

That's because it's ancient. A WD179x or WD279x series is needed to support double density.

Despite the number, the WD1770 is the newest of the lot. (I think it was used in a number of later 8 bit machines like the Radio Shack Color Computer disk interface add-on).

I've got a 1983 WD databook if anybody wants something scanned.

Mark Zenier snipped-for-privacy@eskimo.com Googleproofaddress(account:mzenier provider:eskimo domain:com)

Reply to
Mark Zenier

Here, using an 8051: "Using an IDE Hard Drive with a 8051 Board and 82C55 Chip"

formatting link

Reply to
sdeyoreo

schreef in bericht news: snipped-for-privacy@4ax.com...

Nice project but cannot be used for floppy disk controlling. The IDE or ATA interface does not interface with the disk but with the on board HDD controller. It's almost one to one compatible with the ISA card interface. The FDD interface is on a much lower level.

petrus bitbyter

Reply to
petrus bitbyter

But once you have IDE, then you have it even better.

Plug the drive into your main computer. Do the programming there, and load up the hard drive. Remove the drive and connect it to your small board computer. You've just done the transfer you desire with a hard drive instead of the measly floppy disk.

ONce the IDE hardware is in place, then perhaps (depending on whether there's enough space) one could write software to use a CDROM with the small board computer. That would mean read only on the small computer, but often that would be fine for this sort of thing.

Or, with the IDE interface in place, then doesn't that lead the way for Compactflash cards, which are sort of the modern day equivalent of floppy disks?

Michael

Reply to
Michael Black

Hi Mark,

I'm tempted to agree with you here, although given how utterly simple things like the Apple II and Commodore 64 floppy disk interfaces were, I suspect there's a clever solution where the "analog timing" circuitry can become quite simple.

Agreed, although that "analog timing" can be something as simple as one of those tapped delay lines where you can delay your "sampling" clock by some digitally adjustable increment, an analog phase adjuster, etc.

She had a 50MHz or so clock around to do her sampling with; it was the "brute force" approach. After synchornization, the 6502 was plenty fast at 1MHz for the actual data.

---Joel

Reply to
Joel Kolstad

Yes, although I'd suggest that rather than hard drives, you just use compact flash cards (same electrical interface)... at which point... hey!... you've re-invented the ALFAT chip!

I do recall some hobbyist projects some years back where a PC's CD ROM drive was used to make a standalone CD player, being controlled by a microcontroller (and just using commands to play, stop, and skip tracks, letting the drive do the audio decoding). At the time CD ROM drives were cheaper than standalone CD players.

I'd suggest that USB memory sticks are more like the modern day equivalent of the floppy drive. Unfortunately, interfacing to them is a significantly more complicated undertaking than interfacing to IDE or even a floppy drive, so I don't believe there are any "bit banged" solutions out there to do it -- by the time you finished writing the USB interface code, FAT file system support would be a drop in the bucket! There are some "widgets" out there that, e.g., will transfer data between an internal hard drive to and from an external memory stick, but I'd be surprised if they're 8 bit micos inside rather than just uping the ante to something like a cheap ARM.

Personally, I was quite impressed with the guy who took one of low pin-count AVR microcontrollers (90S2313 or somesuch) and completely bit-banged low-speed (1.5Mbps) USB. His code was tight enough that there was enough room leftover to program up something simple like a mouse or keyboard, a digital I/O interface board, etc. A bit of a shock, I think, to all the microcontroller vendors who had long been adding additional hardware to their chips to provide USB support! (Granted, that support usually was full speed, 12Mbps.)

---Joel

Reply to
Joel Kolstad

I have the schematics of the 1541 in m files.

--
Service to my country? Been there, Done that, and I\'ve got my DD214 to
prove it.
Member of DAV #85.

Michael A. Terrell
Central Florida
Reply to
Michael A. Terrell

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.