The IDE Project

Summary of The IDE Project


The author repaired a crossed-line prototype board to create a semi-portable IDE project using a PIC microcontroller and Compact Flash adapter. The system features high-speed data transfer via low-level assembly routines, currently reaching 430kb/s, with a VT100 serial terminal interface planned for future I2C integration.

Parts used in the IDE Project:

  • Prototype boards
  • Solder and wire
  • PC power supply (AC outlet)
  • Compact flash adaptor
  • PIC microcontroller
  • IDE header
  • 74LS373 chips (2 units)
  • 64kx8bit cache ram chips (2 units from old 486 motherboard)
  • LCD display
  • 8MB CF card

4 prototype boards arrived today. After going over them carefully, I found 4 lines that crossed each other. After some quick surgery with a knife and some solder and wire, the IDE project is now semi portable. The power supply is still out of a PC, so it’s tied to an AC outlet. I’d like to make it battery powered or at least get a smaller power source on it so it’s more easily moved.
There’s mounting holes for standoffs so it can piggyback with a hard drive. Right now, I’ve got the compact flash adaptor mounted on it.

The IDE Project

I’ve been spending every waking moment for the last 3 weeks working on this project. The low level assembly routines have been done for a while. I’ve just been delaying putting them here. My main focus right now is finishing this project in Optama C. I’m working on something I’m going to call PICDOS. So far, I have about 14 commands defined and am working on writing the code behind those commands. For testing purposes, the user interface is a VT100 serial terminal using the built-in USART. Eventually that interface will be replaced with an I2C interface so a microcontroller (such as the BS2) can easily access a FAT partition with minimal hassle.
Here’s the low-level routines wrapped in a C function call:

low.h
low.c
Also, here’s an updated schematic. I’ve switched to an 8-bit LCD interface and moved A5 to C2 to keep all the LCD lines together.

The assembly code is working and allows for an amazing 430kb/s transfers from drive to RAM! It will read my entire 8MB CF card in less than 19 seconds. That’s 134 times faster than the basic code. As soon as I get the rest of the routines converted, I’ll post the code in its entirety. Until then, here’s what I have done.
Here’s the all basic routines and the schematic. The speed is confirmed at 3.2kb/s when writing to RAM, either from a fixed value or from the drive. I haven’t done speed tests for drive write times, but I assume they would be comparable. The assembly routines are partially written. There’s some issue with timing (the PIC is faster than the CF card!) so I’ve had to pull out my o-scope to try to resolve the problem. I think it’s just a matter of inserting a few NOPs.
The IDE Project Schemetic
I’ve finally taken some time to wire up the new PIC version. Other things have taken priority…It took over 3 hours to wire up the PIC, IDE header, 2-74LS373s & 2-64kx8bit cache ram chips pulled from an old 486 motherboard. Basically, I’ve got 128kb of ram arranged so I latch the whole 16bit address, then read/write a whole word of data at a time. This allows for 16bit transfers to/from the hard drive directly to/from RAM. The PIC doesn’t have to intercept or handle the data in any way during a transfer between the hard drive and RAM. So far, I’m using 24 pins out of the 33 available on the PIC. I still have to wire up the LCD before any programming starts.
For more detail: The IDE Project

Quick Solutions to Questions related to the IDE Project:

  • How can the IDE project be made more portable?
    The author wants to replace the current PC power supply tied to an AC outlet with a battery or smaller power source.
  • What is the current data transfer speed achieved by the assembly code?
    The assembly code allows for transfers of 430kb/s from the drive to RAM.
  • How long does it take to read an entire 8MB CF card?
    The system can read the entire 8MB CF card in less than 19 seconds.
  • What interface is currently used for the user interface?
    The user interface is a VT100 serial terminal using the built-in USART.
  • What interface will eventually replace the current user interface?
    The interface will eventually be replaced with an I2C interface to allow easy FAT partition access.
  • Why were NOPs inserted into the code?
    NOPs are being considered to resolve timing issues because the PIC is faster than the CF card.
  • How much RAM is arranged in the new PIC version?
    The setup uses 128kb of RAM arranged to latch the whole 16-bit address and read/write a whole word of data at a time.
  • How many pins on the PIC are currently being used?
    So far, 24 pins out of the 33 available on the PIC are being used.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter