[comp.misc] Help Hapless Hardware Hacker

wfl@sodium.ATT.COM (William Linke) (08/08/90)

Greetings:

I've been looking for the proper newsgroup in which to ask my question,
and none of them seem to be completely appropriate.  But you seem to
be a nice, open-minded group, so here goes!

I designed and built a very simple expansion card for the IBM-PC XT bus,
which decodes a single output port and brings the byte written to it out
to a connector as 8 separate data lines.  It doesn't do any interrupt,
DMA or input stuff.  I tried it in my dual-floppy PC clone and it worked,
to my great excitement.  However, soon thereafter I tried to format some
floppys with the board still in the computer, and was unable to do so.
It turns out that when my board is plugged in, any attempt to write to
a floppy disk will destroy everything on the disk, apparently including
the low-level format data; the disk simply can't be read anymore.  With
my board removed, the PC works properly.  The peculiar thing is that
disks can be *read* just fine with the board in; only writes cause
trouble (any kind of writes; even renaming or removing a file).

The board decodes 12 bits of I/O address.  The I/O port address used
was 0x250, but I also tried changing it to a few other values to no
avail.  Has anyone out there seen a similar problem?  I'd appreciate
any thoughts you might have on what could cause this, or how to approach
tracking it down: I'm not sure where to begin.  (Or, ideas about better
places to ask this question!)  If you reply by email to the address
below, I'll summarize here later.  Thanks,

Bill Linke
att!sodium!wfl
(201) 576-3080 (voice)

israel@mitisft.Convergent.COM (Paul Israel) (08/11/90)

	Are you pulling any wait states? Maybe you're generating a
conflict with the floppy controller. Also, if you've got any bus
signals that your board is loading past two LS-equivalent inputs,
that can also cause problems. Maybe the board isn't seated properly
in the backplane slot, or the slot itself has problems - try moving the
board to another one. Also, make sure your output connector is properly
grounded.

	As to the register address, I'm not sure if it conflicts with
anything else or not, as I don't currently have access to a PC Technical
Reference manual, but certain IO addresses are reserved for dedicated
PC functions. If your decode is stepping on someone elses toes, it might
look as if your board functions ok, but at the same time may end up
screwing over another PC port. Try examining what your port outputs
while you attempt a disk write - if something comes out, then you've
definitely committed a decoding no-no.
-- 
Paul Israel
Renegade Systems, 434 South Bernardo Ave, #2 Sunnyvale, CA 94086
Disclaimer: "Who, me? I wasn't even there!"
ctnews!mitisft!hamster!israel

ardai@bass.bu.edu (Michael Ardai) (08/11/90)

In article <2930@sodium.ATT.COM> wfl@sodium.ATT.COM (William Linke) writes:
-I designed and built a very simple expansion card for the IBM-PC XT bus,

[... It is an 8 bit output port, and it frotzes his floppy drive ]

-The board decodes 12 bits of I/O address.  The I/O port address used
-was 0x250, but I also tried changing it to a few other values to no
-avail.

All 12 bits???  There are only 10 bits used for I/O addressing.

0x250 is listed as 'reserved' in my old copy of the XT tech ref.
A better choice would be 0x300 - 0x31f (Prototype card), 0x380 -
0x38F (SDLC and 2nd Bysynch) or 0x3A0 - 0x3AF (1st bysynch).

Your address decoder should decode A0 - A9, AEN*, and IOR*/IOW*.
IOR* can be used to control the direction of an LS245 if you want 
to make a bidir port.  For example, the prototype card is selected by
((not A5) and (not A6) and (not A7) and (not A8) and A9 and (not AEN*))
with A0 - A4 available for on-board registers.  One nice device to use
for address decoding is the LS138 3-8 decoder with 2 active HI and one
active LO enables.

-Bill Linke

/mike


\|/ Michael L. Ardai     ardai@bu-pub.bu.edu   
--- ---------------------------------------------------------------
/|\ ...!sun!teda!maven.dnet!ardai (preferred)

ekalenda@cup.portal.com (Edward John Kalenda) (08/12/90)

> -The board decodes 12 bits of I/O address.  The I/O port address used
> -was 0x250, but I also tried changing it to a few other values to no
> -avail.
> 
> All 12 bits???  There are only 10 bits used for I/O addressing.
> 
> \|/ Michael L. Ardai     ardai@bu-pub.bu.edu   
> --- ---------------------------------------------------------------
> /|\ ...!sun!teda!maven.dnet!ardai (preferred)

Beg to differ, but my IBM XT Tech Ref indicates I/O port addresses as high
as 0x2393 (Cluster Adapter 4) as reserved by IBM. This needs at least 12 bits
of address decode. The 80x86 family can address the full 16-bit address space
for I/O ports so you should decode them all. If fact the schematics show
all 16 bits being fed into the decode logic for the 8253-5 PIA chip.

Ed

johne@hpvcfs1.HP.COM (John Eaton) (08/18/90)

<<<
< Your address decoder should decode A0 - A9, AEN*, and IOR*/IOW*.
--------------
The classic symptom of ignoring AEN* is that DMA devices will not
work when the board is inserted. DMA opertation will strobe both
IOR and MEMW at the same time it places a valid memory address on 
the BUSS. If that Memory address is the same as your IO address
then AEN* is the only signal that prevents your card from blasting
the DATA Byte. If you ignore it then it won't work.


John Eaton
!hpvcfs1!johne