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

3 posts / 0 new
Last post
OrionSoft's picture
Offline
Last seen: 7 years 9 months ago
Joined: Jan 24 2017 - 09:30
Posts: 8
Trying to make an Apple 1 sort of replica: MC6821 PIA behavior

Hello,
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 http://searle.hostei.com/grant/MonitorKeyboard/index.html
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

cbmeeks's picture
Offline
Last seen: 4 months 6 days ago
Joined: Jan 17 2005 - 14:47
Posts: 61
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 6502.org? They know everything there is to know about the 65xx/68xx chips.

Offline
Last seen: 2 days 10 hours ago
Joined: Jun 5 2008 - 07:26
Posts: 478
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.
http://willegal.net/superproto/index.php?title=Main_Page

regards,
Mike Willegal

Log in or register to post comments