1541 Serial Interface Project

Photo of the first Interface Version:

What is it ?

With this serial interface, you can connect a PC to a Commodore disk drive and transfer data from the floppy to your PC. The disk drive is connected to the interface with the standard floppy cable. The connection from the interface to the PC is done with an ordinary serial cable. So the only thing you need on the PC side, is a free serial port.

Why to build an interface …

The communication on the Commodore serial bus is very time critical. Any software that wants to communicate with a serial commodore device, has to implement some time critical low level communication routines. This kind of communication is not too difficult in operating systems like DOS, but it is very difficult in operating systems like Windows XP or Windows 2000. In addition, all the low level communication stuff has to be rewritten, as soon as the operating system is changed. The communication itself is not too well documented and its hard to write these routines.

This interface is not dependent on the operating system. It could be used on any system with a serial port. Any programmer can send commands through the serial port and write her own user-interface to talk to the floppy or to the Commodore 64 (The Commodore 64 part will be done later). The timing critical stuff all takes place in the interfaces hardware.

One more good thing is, that I am able to play Starcraft, while transfering my discs to the PC. At this time the transfer time for a 35 track disk image is about 65 seconds without any modifications to the disk drive or the cable.

The Hardware

I decided to use an AT90S8535 controller to do the low level communication routines with the disk drive. I know it is far too big for this purpose, but I hate it to change the controller, as soon as it is too small. So I used a controller where I was quite sure, that it won’t be too small for everything I want to do with the interface in the future. At this time, it is running at 3.69 MHz. This makes the serial communiction easier, because the baudrate for the controllers UART is very accurate.

The PC serial port has to be connected to the controllers UART. The voltage levels of the PC and the AVR controller are not compatible. So I used a MAX232 RS232 driver to convert the PC voltage levels to TTL. PORTA of the AVR-Controller is used for the communication with the Commodore disk drive. I used a SN7407 buffer/driver between the AVR and the 1541. I don’t know if it is really needed, but it didn’t work without it, and it is in both 1541 and COMMODORE 64 (SN7406 inverter buffer/driver).

For the power supply, I used a uA7805 positive voltage regulator. You must connect a power supply to the boards power connector. There is a ISP header on the board, to enable in-system programming of the controller. I am sure we will have to change the firmware for the interface very often in the beginning. Theres a SUB-D connector for the serial cable and a DIN connector for the serial commodore cable. There is a reset switch for the interface because it may be necessary to restart it, in some cases. There are quite a few additional connectors. Its cool to have some pins to measure the signals on the board. I made the schematic and the board with EAGLE.

Here is a picture of the current PCB:

As you can see, this is also a little evaluation board, because it also brings out almost all the AVR's pins onto headers. The Leds top left, can be connected to any IO-Port of the microcontroller. The board looks a bit complicated, but it has only one signal layer which makes it relatively easy to build at home. If you want to build it, download the Eagle files here.

The Firmware

Firmware Source (newer version coming soon … this version still needs 3 min and 20 seconds)


We need to programm the AVR controller with the code that is necessary to communicate with the PC and with the floppy drive. The “language” of the floppy is quite clear.It must be the serial protocol that is also implemented in the COMMODORE 64 Kernel ROM. The interface is accepting commands from the PC. At this time I am using a command format that will be described later. I don’t know, which commands we will need in the end, but for now we have a few commands like “read directory”, “read disk” or “read floppy status”. I will try to implement writing-routines later (e.g. “write d64 image”).

The Software

We still need somebody who gives the commands to the interface. I wrote a little commander for Win32. I called it “1541 Serial Commander. Of course you can write your own front end. Use any operating system you like. Just send commands through the serial port J .

The Theory