Trying to make an Apple 1 sort of replica: MC6821 PIA behavior

2 replies [Last post]
OrionSoft's picture
Joined: Jan 24 2017
Posts: 8

Since I can't get any answer from V.Briel about the Replica 1 computer
I'm trying to make a sort of Replica 1 computer myself, but I'm not an electronic engineer, just a programmer.

I'm trying to setup the MC6821 PIA, and I have a problem with it. (the exact reference is EF68B21P, it's a 2mhz capable 6821)
After configuring the PIA just like the Woz monitor do (Control Register = 0xA7) whenever I input a signal into the CA1 pin, I get no info in the control register (value is always 0x27), and no output on the CA2 pin either.
I'm not using a propeller chip, I'm trying to use this keyboard/video interface
but right now I'm just trying to debug the PIA behavior with an Arduino and some LEDs to watch the input/ouput,
and can't figure out how to get the PIA to receive the ack from CA1 pin Sad

Using the Arduino, I tried to set the CA1 pin permanently, or just send a pulse, but when I read the Control Register after that, I don't have the bit 7 set.
and, about the CA2 pin, I only get a signal on it when I send 2 pulses on CA1 without reading the Control Register in between (no pulse on the E pin)

What would be great is if someone could tell me what are the signal on the CA1/CA2 CB1/CB2 pin on an Apple 1
High or Low, continuous signal or pulse ?

Thank you

Edit: after reviewing the early Replica 1 ATmega source code, I think I have my answer, but testing the same behavior with my arduino doesn't work
I guess I will need to wire the complete computer and see if it works like that


I'm young retro computing geek, and indie game developer on retro consoles.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cbmeeks's picture
Joined: Jan 17 2005
Posts: 56
Re: Trying to make an Apple 1 sort of replica: MC6821 PIA ...

I'm not an expert on the PIA but have you asked the guys over at They know everything there is to know about the 65xx/68xx chips.

Joined: Jun 5 2008
Posts: 383
Re: Trying to make an Apple 1 sort of replica: MC6821 PIA ...

Those PIAs are exceedinly simple, but tricky to program, all at the same time. The data sheet is your friend. There are some examples on my superproto page of 6522 programming, which is a slightly enhanced variation, which may be of some help.

Mike Willegal