From: cd827@cleveland.Freenet.Edu (Jeffrey J. McWilliams)
Newsgroups: comp.sys.atari.8bit
Subject: Re: Adding a 2nd PIA
Date: 14 Sep 1992 18:47:07 GMT
Organization: Case Western Reserve University, Cleveland, OH (USA)
Reply-To: cd827@cleveland.Freenet.Edu (Jeffrey J. McWilliams)
NNTP-Posting-Host: hela.ins.cwru.edu


In a previous article, Rick_Michael_Cortese@cup.portal.com () says:

>Jeff: Exactly! You'd be killer on Jeapardy. Chuck's stuff is good, but
>for simplicity, one piggy backed chip & one jumper has got to be simpler.
>The 2nd '138 so you can add 7 more devices is IMHO the right way to do it.
>I was "IFFY" on some of the other BUSS ideas I was throwing out, but this
>seems "RIGHT". Heck, you only need 8 data lines, lower 8 bits of address,
>and some glue signals W power. I just spent $130 for a burnner that's just
>a couple of PIA's with some voltage regulators & a ZIF socket. 
>BTW: I'll still admit you're right with the 16550, but like I said, I'm
>a little lazy for doing things right. I will write a R: handler for the
>6551 when I finish it. Would've been this weekend, but my nephew's in the
>finals of some batting contest before the Oakland's A's game so I'm out
>of here!
>

Rick,

Hmm, There is a basic design for AN EPROM burner that came with the
Microport XL experimenter's kit.  I could expand on it, but what 
bothers me the most, is how to allow different sized EPROMS as part of the
BASIC design.  Different EPROM sizes may have different numbers of pins,
thus meaning you have to pipe +5 and GND and the other signals to the
proper pins on the ZIF socket.  I have been bothered by how that is 
implemented.

I would really like to see someone use the 16550 in an RS232 port for the
8 bit.  I can't afford to do it myself, either in terms of time or money
right now.  I could probably do the hardware, but I am not good at
writing system level drivers, like an RS232 driver.

What you could do, wire in a 3/8 decoder to A7, A6, A5
with the original PIA enable enabling the second 3/8.  That way,
you have 8 devices mapped in the $D3xx region.
Use 4 7474 Dual D flip-flops mapped as one 8 bit register at
$D1FE as an IRQ register.  Tie the S lines to the IRQ's of each
PIA or other device to be mapped at $D3xx, ORING all of the 
Q outputs together and send that to the IRQ of the 6502.
Wait, IRQ is pulsed isn't it?  You would have to make it a one-shot or
something like that.  No big deal.  The BASIC concept being
that you read $D1FE to see which device caused the interrrupt, and then
clear that bit so that the IRQ handler doesn't get confused if another
device IRQ's at about the same time the first device did.

Putting 8 devices in the $D3xx region isn't so bad, each one has 32 bytes
of address space, which is plenty for most devices like PIAs and UARTs
and stuff, maybe not all the registers of a 68881, but that's another
story altogether anyhow.

I think if you start adding a lot of extras, you should buffer
the lines, and but a transceiver on the data line to buffer it as well.
I doubt you could put 8 devices mapped anywhere without causing a bus
failure or something.

Jeff McWilliams..... Freenet post
-- 
Jeff McWilliams  -->student, Electrical Enginnering, Michigan Tech. Univ.

cd827@cleveland.freenet.edu  OR  jjmcwill@mtus5.cts.mtu.edu