Sorry if this is a newbie question. Let's say I have a VIA port attached to I/O pins of a micro-controller like ATMega128P such as an Arduino.
The VIA would have port A set as inputs and the Arduino would be outputs.
Now, what would happen if I accidentally set the VIA port A as outputs too and the Arduino started to output 5V?
Seems like that could cause some damage. I suppose putting something like the '245 in between would help with that. Then tie the output in one direction.
What are your suggestions?
Thanks!
Protecting VIA pins
Protecting VIA pins
Cat; the other white meat.
Re: Protecting VIA pins
I'd just use resistors. Maybe 1K. You can get 8 in a single DIP package or use discrete resistors.
Bill
Re: Protecting VIA pins
As Bill says - current limiting resistors. Calculated for the worst case of the total current through the substrate on each part - choose the smaller! - if all pins are being driven, and without exceeding the current limit on any pin.
The bad time is when one is driving low and one is driving high, but don't forget what other pins may be driving.
1k will limit to 5mA each pin; I'd prefer a bigger resistor. If you're going only between logical inputs and outputs, half a milliamp is plenty into CMOS inputs. And I discovered yesterday that resistor packs are around 80c each, but resistors are half a cent...
Neil
The bad time is when one is driving low and one is driving high, but don't forget what other pins may be driving.
1k will limit to 5mA each pin; I'd prefer a bigger resistor. If you're going only between logical inputs and outputs, half a milliamp is plenty into CMOS inputs. And I discovered yesterday that resistor packs are around 80c each, but resistors are half a cent...
Neil
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Protecting VIA pins
barnacle wrote:
1k will limit to 5mA each pin; I'd prefer a bigger resistor. If you're going only between logical inputs and outputs, half a milliamp is plenty into CMOS inputs.
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: Protecting VIA pins
In the early days of the Raspberry Pi we did all sorts of things - like design a completely new IO board (e.g. The Gertboard) to "protect" the Pi, use Zener diodes for over voltage, resistors to protect the 2 outputs scenario and so on.
After a (short) while this became boring and just got in the way and added cost and complexity to something that's otherwise disposable.
I'm not suggesting that vintage parts are disposable, but modern ones that you can still buy for a few pounds? Go for it.
-Gordon
After a (short) while this became boring and just got in the way and added cost and complexity to something that's otherwise disposable.
I'm not suggesting that vintage parts are disposable, but modern ones that you can still buy for a few pounds? Go for it.
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Protecting VIA pins
cbmeeks wrote:
The VIA would have port A set as inputs and the Arduino would be outputs. Now, what would happen if I accidentally set the VIA port A as outputs too and the Arduino started to output 5V?
Big-time contention, for sure, if using the W65C22S. Like the others suggested, some series resistance should avoid disaster. Alternatively, you could use the W65C22N, which has built-in current limiting resistors on its outputs. That would protect the C22, but no telling what might happen to the Arduino.
Incidentally, the latest data sheet for the W65C22 shows an FMAX vs VDD curve that is the same as that of the 65C02, implying that the C22 could be easily overclocked.
x86? We ain't got no x86. We don't NEED no stinking x86!