So the card which was having issues seems to be a bad card. I intermitantly get "IO ERROR" on my PC card reader, so to date there are no cards which do not work with the interface.
I have also been toying with a LED driver circuit. Basically the floppy LED on the keyboard gets replaced with a bi-colour (yellow / green). so yellow flashes as normal, and green flashes on HDD. This is easy with a seperate wire to the LED, but I was looking at ways to do this without using a additional wire to the keyboard to drive the green LED.
So I created this...
led.jpg
This is only a simulation circuit.. There is no LED library :(, so I used 3x 4148 diodes in series to mimic the LEDs.
The yellow LED remains the same as the original circuit. However the same signal now feeds the gate of a MOSFET (had to use a general one as its not got many fets listed in the libs ) which drives the green LED.
The design challenge, was to basically have three things going on with only one wire. Which is yellow LED on, green LED on, and both off.. Plus only one LED can be on at a time (none of this mixed colour rubbish).
So let's step through it all.. As before, the ST side drives the yellow LED to GND which allows 5 V to flow and obviously yellow LED lights up. At the same time, this discharges the mosfet gate, so the green LED is turned off.
Now that IDE interface will drive the signal HI (it will be rooted via the PLD, but I will not go into all that at this point). So now the yellow LED 5V will have on both sides so it is turned off. The MOSFET gate will now see 5V and turn on which grounds the green LED and allowing it to light up. Basically the MOSFET is acting as a inverter.
The tricky part is when the signal goes tri-state, we want both LEDs to turn off.. As there is no ground on the yellow LED, that is of course off. As there is no (HI) 5V on the MOSFET, the green LED is also off. The problem with this is that the yellow LED will conduct and pass a voltage to the MOSFET which can actually turn it on we are not careful.. That part drove me nuts for a while..
Basically we have to get the voltages balanced out correctly. Say for example if the LED had a voltage drop of 3volts, from the 5V rail this would give us 2 volts to the MOSFET gate. So providing the gate voltage threshold is higher than 2 V, it will not actually turn on, and of course when it is actually driven high with 5 V, this pushes it over the threshold voltage and the light up green LED. So there is a little bit of a voltage balance to be done, with so many variations of MOSFET, it's not going to be a problem. I already have a shortlist of MOSFETs which look interesting for the job.
So back to the PLD part. The drive light signal will need to be broken from the driver buffer the keyboard header itself and rooted via the PLD. This way any floppy access will light the yellow LED as normal, but this will be overridden on IDE access where the pin will be driven high to light up the green LED. Otherwise, if we was copying files from floppy to IDE, the floppy light stays on for a while even during IDE access.. So we would have the ST driving the LED pin low, and the PLD trying to drive it high for the IDE LED.. So we have to route it via the PLD to prevent the ST from destroying itself :)
So while it is simple to route a extra wire the keyboard LED, I wanted to see if I could come up with a solution without using a extra wire to the keyboard itself. So I thought I would share this solution with people as it will be integrated into the interface when I have done the firmware and hardware tweaks.
In terms of the mongrel motherboard, this can be all wired up on the motherboard as standard. Overall it does not need much circuit wise other than a small PCB with the 2 colour LED and MOSFET on it.