[Coco] CoCo3 PIA?

Steve Bjork 6809er at bjork-huffman.net
Thu Jan 4 23:10:12 EST 2007


HI Mark,

Let me take a shot at this.  (I'm not should if you already gotten your 
answer.)  But please don't shoot me if I get it wrong, it been a long since 
I work on this coco stuff...

There is a very good reason why they need to use the unique 6822 (open 
collector output) version of 6821 PIA in the coco 3 (and maybe the coco 2) 
and it's to do with short circuits.

First let's review how the keyboard works: Take from the CoCo 1 service 
manual...

The components which make up the Keyboard Interface are shown on sheet 3 of 
the schematic, upper left corner. The PIA chip (U8) is the only digital 
circuit used. The PIA chip is a programmable interface device which 
functions as both an input and an output register. The eight keyboard 
columns are attached to the B side of the PIA. These eight lines are 
programmed to be outputs. The seven keyboard rows are attached to the A 
side of the PIA. These seven PIA lines are programmed to be inputs.

To read the keyboard, only one column is enabled by writing a zero in the 
bit that corresponds to that column and by writing ones in all the other 
bits. If a key has been pressed in that column, one of the input lines will 
be a zero and the key location will correspond to the bit that is low. By 
scanning each column in the keyboard, all of the keys may be checked.

See this link for a schematic of the keyboard matrix: 
http://homepage.ntlworld.com/kryten_droid/coco/coco_tm_68.png

When a 6821 PIA creates an output on a port, it do so by lowering the 
voltage to under 0.2 for logic zero state or raising it over 2.0 (or so) 
volts for a logic one state.  This is standard for most TTL logic.

Let us say that the keyboard reading program is outputting a logic zero on 
PB0 pin and PB1-7 pins at logic one levels.  This would create a logic zero 
on PA6 when the [enter] key was pressed.  This works find, so far.

What happens if both the [enter] and the [clear] are pressed at the same 
time?  A short circuit!

You see, the logic one state of 2.0+ volts from PB1 is shorted through the 
[clear] and the [enter] keys to the 0.2 volts of PB0.  Not very good for 
this PIA and why they sometimes needed to be replaced after book or 
something else left on the keyboard for extended period of time.

On the other hand, the 6822 open collector outputs only drives the pin to 
0.2 volts for a logic zero and does nothing for a logic one state.  That's 
right, 6822 does not drive the output line 2.0 volts for a logic one state 
so there is no damage if more than one output pins are shorted together.

The only draw back is that "pull-up" resisters are used on each of the 8 
output lines to create a default logic one state.  It should be noted that 
the "pull-up" resisters can handle the short circuit create by the [enter] 
and the [clear] being pressed at the same time.

Don't get started on how the joystick buttons can play havoc with the PIA too.

I hope this helps,

Steve Bjork

At 11:58 AM 1/3/2007 -0600, you wrote:

>Does someone know if IC5, LSC part number is a TTL or CMOS device?
>I'm working on on interface device and I need to make sure that I don't 
>have a I/O conflict.
>Since it is on the keyboard port it appears that a zero represents a key 
>press. So the A side must be inputs and the B side are the drives of IC5.
>
>With that said then if no key is pressed(N.O. contact configuration) the A 
>side input of the PIA must be pulled high, thus indicating no key.
>This is a weird part number and I'm not exactly sure what is different in 
>this part than a 6821.
>
>Someone know more on this device????
>
>TIA,
>Mark
>Coco at maltedmedia.com
-------------- next part --------------


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.5/616 - Release Date: 1/4/2007 1:34 PM


More information about the Coco mailing list