Can anyone explain what this capacitor is doing here?
I'm getting ready to build an RC6502 multi-board system. This will be my first "engineering" retrocomputing project (I mean, using real parts, solder, schematics, and so on) as opposed to "science" projects, like "From Nand 2 Tetris" and SICP (all logic and theory centered, relying on emulation and such). While I'm waiting for my PCBs to be delivered I've been studying the schematics.
This is from the schematic for the serial I/O board. Is it good practice to connect two output pins together into one signal like this? If I remember, in Nand2Tetris, connecting two outputs together to a single input is simply an illegal operation, so I don't understand what this part of the circuit is trying to do.
I have some other questions that may be cleared up when I understand what that capacitor is for. Why is the high-order bit of of port B called "DA" instead of D7 after it is wired together with CB2? Why is the capacitor here an electrolytic (polarized) one, while the same circuit in the SBC version of this design has a ceramic (non-polarized) one? According to the WD65C21 datasheet, pin CB2 is bi-directional, but this particular design seems to using it only as an output pin; I thought maybe the capacitor has something to do with keeping current from going the wrong way through the inverter, but wouldn't you use a diode for that?
What is this capacitor up to? - RC6502
What is this capacitor up to? - RC6502
"The key is not to let the hardware sense any fear." - Radical Brad
Re: What is this capacitor up to? - RC6502
Welcome!
I don't know the answer, but I can say it looks a bit like the original, which can be seen at the Apple 1 Registry
I don't know the answer, but I can say it looks a bit like the original, which can be seen at the Apple 1 Registry
Re: What is this capacitor up to? - RC6502
Hey Ed! Thanks! Finding the schematic for the original Apple I so I could compare was on my list of things to do this afternoon!
"The key is not to let the hardware sense any fear." - Radical Brad
-
leepivonka
- Posts: 167
- Joined: 15 Apr 2016
Re: What is this capacitor up to? - RC6502
So far I've got:
The 6821 & associated circuitry is designed to be like the Apple I to software.
PB6..0 are character data to the terminal. They are programmed as outputs by WozMon.
PB7 is programmed to be an input by WozMon. It is high when data is available for the terminal.
CB2 is programmed to be a handshaking line by WozMon. It is low after PB is written, high after CB1 goes low.
The capacitor is intended to keep the output from hanging forever if the CB1 ack doesn't come; but I haven't found the pulldown on OUT_DA yet.
The 6821 & associated circuitry is designed to be like the Apple I to software.
PB6..0 are character data to the terminal. They are programmed as outputs by WozMon.
PB7 is programmed to be an input by WozMon. It is high when data is available for the terminal.
CB2 is programmed to be a handshaking line by WozMon. It is low after PB is written, high after CB1 goes low.
The capacitor is intended to keep the output from hanging forever if the CB1 ack doesn't come; but I haven't found the pulldown on OUT_DA yet.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: What is this capacitor up to? - RC6502
Welcome.
What does this get connected to?
You won't find any electrolytic capacitors (or any other polarized types either for that matter) in 10nF (.01µF). I suspect whoever drew it got lazy and just grabbed that library component instead of looking for the right one. Even if it really were polarized, it suggests that the inverter's output would never be high when PB7 is low.
Something definitely seems to be out of place though, for multiple reasons. [Edit: leepivonka above answered this, apparently posting just as I started writing.]
What does this get connected to?
You won't find any electrolytic capacitors (or any other polarized types either for that matter) in 10nF (.01µF). I suspect whoever drew it got lazy and just grabbed that library component instead of looking for the right one. Even if it really were polarized, it suggests that the inverter's output would never be high when PB7 is low.
Something definitely seems to be out of place though, for multiple reasons. [Edit: leepivonka above answered this, apparently posting just as I started writing.]
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: What is this capacitor up to? - RC6502
Hi Garth!
In a real Apple I it's part of the connection between the "CPU" area of the motherboard and the "Terminal" area of the motherboard; this signal, specifically, goes to a 74174 chip that is part of a (to me!) extremely complex circuit that is purported to mange carriage returns. Theoretically, for the RC6502, it goes to an Arduino Nano that operates as a terminal emulator. I am not planning to involve the Arduino in my build, however.
There's a pin-header for all the terminal signals so that you can (e.g.) hook up a real Apple I keyboard or replica of such if you happen to have one.
You won't find any electrolytic capacitors (or any other polarized types either for that matter) in 10nF (.01µF). I suspect whoever drew it got lazy and just grabbed that library component instead of looking for the right one. Even if it really were polarized, it suggests that the inverter's output would never be high when PB7 is low.
OK that makes some sense! Thanks!
I found this explanation at SB-Projects:
This clears up my confusion about tying the lines together... I was imagining PB7 to be an output pin, because of how the RC6502 schematic is drawn - confusingly! It is in fact the CB2 output that feeds both the PB7 input *and* is the OUT_DA signal. Woof! Thanks for pointing me in the right direction, guys!
GARTHWILSON wrote:
Welcome.
What does this get connected to?
What does this get connected to?
GARTHWILSON wrote:
You won't find any electrolytic capacitors (or any other polarized types either for that matter) in 10nF (.01µF). I suspect whoever drew it got lazy and just grabbed that library component instead of looking for the right one. Even if it really were polarized, it suggests that the inverter's output would never be high when PB7 is low.
I found this explanation at SB-Projects:
Quote:
Acknowledge Circuit
The clipping above shows the acknowledge circuitry. Its purpose is to signal the acceptance of the character by the terminal to the software. You won't find the circuit as it is drawn here in the original documentation. The left half of it is on the processor sheet, while the right half is on the terminal sheet. Both halves are interconnected by the signals DA and RDA.
Writing a character to the PIA's terminal output automatically clears the output CB2. This will make PB7 high, signaling to the software that it is no longer allowed to write new data to the output. Once this signal is clocked into C7 it is combined with the CURSOR signal. This combined signal is then also combined with the 2 most significant bits of the printed ASCII character. Only when at least one of these two bits is "1" AND the CURS signal is "1" the WRITE signal is asserted. This prevents CTRL characters from being written to the screen, which would be meaningless because the character ROM can not display CTRL characters.
When the CURS signal becomes active the one shot generator B3 is triggered to generate a 3.5µs pulse to the CB1 input of the PIA, which will effectively clear the status of CB2. From then on the software is free to write a new character to the terminal again.
The clipping above shows the acknowledge circuitry. Its purpose is to signal the acceptance of the character by the terminal to the software. You won't find the circuit as it is drawn here in the original documentation. The left half of it is on the processor sheet, while the right half is on the terminal sheet. Both halves are interconnected by the signals DA and RDA.
Writing a character to the PIA's terminal output automatically clears the output CB2. This will make PB7 high, signaling to the software that it is no longer allowed to write new data to the output. Once this signal is clocked into C7 it is combined with the CURSOR signal. This combined signal is then also combined with the 2 most significant bits of the printed ASCII character. Only when at least one of these two bits is "1" AND the CURS signal is "1" the WRITE signal is asserted. This prevents CTRL characters from being written to the screen, which would be meaningless because the character ROM can not display CTRL characters.
When the CURS signal becomes active the one shot generator B3 is triggered to generate a 3.5µs pulse to the CB1 input of the PIA, which will effectively clear the status of CB2. From then on the software is free to write a new character to the terminal again.
leepivonka wrote:
PB7 is programmed to be an input by WozMon. It is high when data is available for the terminal.
CB2 is programmed to be a handshaking line by WozMon. It is low after PB is written, high after CB1 goes low.
The capacitor is intended to keep the output from hanging forever if the CB1 ack doesn't come; but I haven't found the pulldown on OUT_DA yet.
CB2 is programmed to be a handshaking line by WozMon. It is low after PB is written, high after CB1 goes low.
The capacitor is intended to keep the output from hanging forever if the CB1 ack doesn't come; but I haven't found the pulldown on OUT_DA yet.
"The key is not to let the hardware sense any fear." - Radical Brad
Re: What is this capacitor up to? - RC6502
Paganini wrote:
This clears up my confusion about tying the lines together... I was imagining PB7 to be an output pin, because of how the RC6502 schematic is drawn - confusingly! It is in fact the CB2 output that feeds both the PB7 input *and* is the OUT_DA signal. Woof! Thanks for pointing me in the right direction, guys!
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: What is this capacitor up to? - RC6502
gfoot, it looks like you found the Apple 1's version of "the killer poke"!
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!
Mike B. (about me) (learning how to github)
Mike B. (about me) (learning how to github)
Re: What is this capacitor up to? - RC6502
I'm assuming there's a pull-up resistor on whatever it's connected to (it looks like it goes straight into an Arduino, and I don't have the patience to track down how the software is configuring that pin). If that's the case, this is a high-pass filter, and the capacitor will be converting a low-going edge into a short low pulse.
Start with the output from the inverter high and the capacitor discharged. OUT_DA will be high. If the inverter output goes low, there is still 0V across the capacitor and OUT_DA gets pulled low too. Current now flows through the pull-up resistor, charging the capacitor and OUT_DA will eventually reach 5V again. The result is a low-going pulse.
If the inverter output then goes high, OUT_DA will be pushed up to twice the supply voltage. That's still seen as a 'high' signal, so as far as the Arduino is concerned, nothing has happened. Now it's getting discharged through both the resistor and the protection diode on the input it's connected to, so the voltage on OUT_DA will drop back to 5V quickly. The capacitor now has 0V across it, and we can start again.
10nF is a fairly small capacitor. It won't hold a lot of energy, and that is the sort of situation the protection diodes are there for. Still, it doesn't make me comfortable. I'd have put a series resistor in there to reduce the current through them. Actually, I wouldn't have done it this way at all - I'd configure the input on the Arduino to do the edge detection for me if that's possible, or do it in software if it isn't. But I don't know the details of how this is supposed to work; there might be good reasons for doing it like this.
Start with the output from the inverter high and the capacitor discharged. OUT_DA will be high. If the inverter output goes low, there is still 0V across the capacitor and OUT_DA gets pulled low too. Current now flows through the pull-up resistor, charging the capacitor and OUT_DA will eventually reach 5V again. The result is a low-going pulse.
If the inverter output then goes high, OUT_DA will be pushed up to twice the supply voltage. That's still seen as a 'high' signal, so as far as the Arduino is concerned, nothing has happened. Now it's getting discharged through both the resistor and the protection diode on the input it's connected to, so the voltage on OUT_DA will drop back to 5V quickly. The capacitor now has 0V across it, and we can start again.
10nF is a fairly small capacitor. It won't hold a lot of energy, and that is the sort of situation the protection diodes are there for. Still, it doesn't make me comfortable. I'd have put a series resistor in there to reduce the current through them. Actually, I wouldn't have done it this way at all - I'd configure the input on the Arduino to do the edge detection for me if that's possible, or do it in software if it isn't. But I don't know the details of how this is supposed to work; there might be good reasons for doing it like this.
Re: What is this capacitor up to? - RC6502
Since the original Apple doesn't have that capacitor, and it seems like it might only be there because of something to do with Arduino, which I'm not using, I think I might just leave it out. There are no pullup resistors, so whatever's going on must be managed by software.
"The key is not to let the hardware sense any fear." - Radical Brad
Re: What is this capacitor up to? - RC6502
Quote:
What is this capacitor up to?
Sorry I can't be of more help.
Bill