Use a 65C22 as a level shifter too? (Apple IIe)
Use a 65C22 as a level shifter too? (Apple IIe)
I want to build a circuit using a 3.3v microcontroller and a couple 65C22's. (A Mockingboard clone).
The 65C22 can run at 3.3v (IIRC) so connecting it directly to the mcu should be straightforward.
However, the Apple IIe's slot voltages are at 5V+ typically (ignoring the -5 and +12).
So, could the 65C22 be used to level shift the voltages to/fro the slot and the MCU? In other words, use 5v when talking to the CPU and 3.3v when talking to the MCU?
Or, should I put some level converters between the 65C22 and CPU?
The MCU shouldn't ever talk directly to the slot (5V). If it did, I would probably put a dedicated level shifter in there for any one-offs.
Thanks for any input!
The 65C22 can run at 3.3v (IIRC) so connecting it directly to the mcu should be straightforward.
However, the Apple IIe's slot voltages are at 5V+ typically (ignoring the -5 and +12).
So, could the 65C22 be used to level shift the voltages to/fro the slot and the MCU? In other words, use 5v when talking to the CPU and 3.3v when talking to the MCU?
Or, should I put some level converters between the 65C22 and CPU?
The MCU shouldn't ever talk directly to the slot (5V). If it did, I would probably put a dedicated level shifter in there for any one-offs.
Thanks for any input!
Cat; the other white meat.
Re: Use a 65C22 as a level shifter too? (Apple IIe)
You have various options.
Option 3 is unidirectional (notice the one-way arrow). You can omit the level shifter when the output of a 3V device drives the input of a 5V device and the inputs of the latter are specified to accept TTL voltage levels. IIRC the inputs of WDC 65c22's do NOT accept TTL voltage levels, so get a Rockwell part to use this option.
I believe that's true for WDC parts. Rockwell et al aren't specified for 3V operation but would probably work.
HTH!
Jeff
- Apple 6502 running at 5V <---> level shifter <---> 65C22 running at 3V <---> microcontroller at 3V
- Apple 6502 running at 5V <---> 65C22 running at 5V <---> level shifter <---> microcontroller at 3V
- Apple 6502 running at 5V <---> 65C22 running at 5V <--- microcontroller at 3V
Option 3 is unidirectional (notice the one-way arrow). You can omit the level shifter when the output of a 3V device drives the input of a 5V device and the inputs of the latter are specified to accept TTL voltage levels. IIRC the inputs of WDC 65c22's do NOT accept TTL voltage levels, so get a Rockwell part to use this option.
Quote:
The 65C22 can run at 3.3v
HTH!
Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
Re: Use a 65C22 as a level shifter too? (Apple IIe)
Ah, thanks for the reply.
I have a couple of the WDC versions.
http://www.mouser.com/Search/ProductDet ... 22S6TPG-14
Sorry, but I'm not 100% sure I know what you mean here. In the past, I've used these parts to build a Mockingboard clone but I used all 5V parts (no MCU). Are you saying that I will have trouble interfacing with a 3.3v part? Sorry, if I'm being dense here.
From what you said, it sounds like option 2 might be my best bet because the MCU is the only part that *has* to be 3.3v and it does need to be bi-directional. I'm just going to need about 26 level shifters!
Thanks again.
I have a couple of the WDC versions.
http://www.mouser.com/Search/ProductDet ... 22S6TPG-14
Quote:
IIRC WDC 65c22's do NOT accept TTL voltage levels, so get a Rockwell part
From what you said, it sounds like option 2 might be my best bet because the MCU is the only part that *has* to be 3.3v and it does need to be bi-directional. I'm just going to need about 26 level shifters!
Thanks again.
Cat; the other white meat.
Re: Use a 65C22 as a level shifter too? (Apple IIe)
cbmeeks wrote:
Quote:
IIRC WDC 65c22's do NOT accept TTL voltage levels, so get a Rockwell part
It's generally true that a device running on 3V will output high and low logic levels of roughly 0 and 3 volts. So, the input of the device receiving that signal needs to recognize 0 as a valid logic low (no problem) and recognize 3V as a valid logic high. Problem! A WDC 65C22 running on 5V won't (according to the specs, at least) recognize 3V as a valid logic high.
The specs for Rockwell and many others are different. Their inputs deem anything over about 2V to be high -- that's the way things work with TTL voltage levels. So it gives us a free ride when it comes to level shifting! But in one direction only.
There's a different trick for going from 5V levels to 3V -- use a pair of resistors as a voltage divider. But, again, this is uniudirectional.
Last edited by Dr Jefyll on Tue Feb 02, 2016 7:51 pm, edited 1 time in total.
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
Re: Use a 65C22 as a level shifter too? (Apple IIe)
AH! Yeah, actually I remember that now. I just wasn't putting 2 and 2 together.
You answered two of my questions then. I was thinking the 65C22 could be used as a level shifter because on the 5V side, it would know 0v = off and 4.5-5v (or so) = on. And then on the 3.3v side, 0v = off and 3 - 3.3 (or so) would be high. But it sounds like 3.3v isn't enough to register as high.
Some IC's, however, will give you that "free" bi-directional level shifting...just not the WDC 65C22.
Makes sense. Also, kind of a bummer too. I might look into the Rockwell version as well. At least I know what to look for now.
Thanks again!
You answered two of my questions then. I was thinking the 65C22 could be used as a level shifter because on the 5V side, it would know 0v = off and 4.5-5v (or so) = on. And then on the 3.3v side, 0v = off and 3 - 3.3 (or so) would be high. But it sounds like 3.3v isn't enough to register as high.
Some IC's, however, will give you that "free" bi-directional level shifting...just not the WDC 65C22.
Makes sense. Also, kind of a bummer too. I might look into the Rockwell version as well. At least I know what to look for now.
Thanks again!
Cat; the other white meat.
Re: Use a 65C22 as a level shifter too? (Apple IIe)
cbmeeks wrote:
Some IC's, however, will give you that "free" bi-directional level shifting...
Say we have a 5V-powered Rockwell 65c22 and a 3V microcontroller. The free level shifting only happens in regard to signals sent from the uC to the 65c22. (ie- from a 3V output to a TTL compatible input)
Sending in the other direction you need a different trick. In the case of a 6522 pin that's an OUTPUT, then use a pair of resistors as a voltage divider to reduce the 5V signal to a 3V signal that can be accepted by the uC. Or of course a level-shifter IC can do the job.
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
Re: Use a 65C22 as a level shifter too? (Apple IIe)
Dr Jefyll wrote:
cbmeeks wrote:
Some IC's, however, will give you that "free" bi-directional level shifting...
We have a 5V 65c22 and a 3V microcontroller. The free level shifting only happens in regard to signals sent from the uC to the 65c22. (ie- from a 3V output to a TTL compatible input)
Sending in the other direction you need a different trick. In the case of a 6522 pin that's an OUTPUT, then use a pair of resistors as a voltage divider to reduce the 5V signal to a 3V signal that can be accepted by the uC. Or of course a level-shifter IC can do the job.
This is a hobby project so I will probably just take the easy (lazy?) route and use level shifters.
Thanks.
Cat; the other white meat.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Use a 65C22 as a level shifter too? (Apple IIe)
Dr Jefyll wrote:
There's a different trick for going from 5V levels to 3V -- use a pair of resistors as a voltage divider. But, again, this is uniudirectional.
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: Use a 65C22 as a level shifter too? (Apple IIe)
Option 1 should suit you, then.
1. - Apple 6502 running at 5V <---> level shifter <---> 65C22 running at 3V <---> microcontroller at 3V
As noted, in addition to its data bus the VIA has register-select and control inputs that need shifting too. So you'd need two of those 74LVX4245 (or whatever). But the cool thing is, if you build your card that way then the card could talk to 3V devices or 5V devices. Just have a jumper that selects 3V or 5V to power the VIA. (The level shifter won't mind "shifting" signal from 5V to 5v.
)
1. - Apple 6502 running at 5V <---> level shifter <---> 65C22 running at 3V <---> microcontroller at 3V
As noted, in addition to its data bus the VIA has register-select and control inputs that need shifting too. So you'd need two of those 74LVX4245 (or whatever). But the cool thing is, if you build your card that way then the card could talk to 3V devices or 5V devices. Just have a jumper that selects 3V or 5V to power the VIA. (The level shifter won't mind "shifting" signal from 5V to 5v.
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
Re: Use a 65C22 as a level shifter too? (Apple IIe)
Good idea.
So, on those transceivers, would I have to encode the logic to switch between A -> B or B -> A?
I have a handful of these:
https://www.sparkfun.com/products/12009
Which uses the BSS138.
So, on those transceivers, would I have to encode the logic to switch between A -> B or B -> A?
I have a handful of these:
https://www.sparkfun.com/products/12009
Which uses the BSS138.
Cat; the other white meat.
Re: Use a 65C22 as a level shifter too? (Apple IIe)
cbmeeks wrote:
So, on those transceivers, would I have to encode the logic to switch between A -> B or B -> A?
Depending on your skill level, it may be best to use option 2 or 3 instead. The Sparkfun card with the BSS138's is interesting. But I wouldn't recommend it for use with option 1.
Quote:
I'm just going to need about 26 level shifters!
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
Re: Use a 65C22 as a level shifter too? (Apple IIe)
Quote:
It might help to tell us the details. (I have no idea what a Mockingbird is.)
https://en.wikipedia.org/wiki/Mockingboard
Basically, it's a sound card that was designed for the Apple II series of computers in the 80's.
Cat; the other white meat.
Re: Use a 65C22 as a level shifter too? (Apple IIe)
What are the details of the connections you hope to establish? How many input pins will the 65c22 need to read from? How many output pins will it write to? And are there any bi-directional signals -- such as a data bus that carries data back & forth between two devices?
If would be helpful if you post either a basic diagram or a careful description of what the 65c22 connects to -- on the Apple side AND the Mockingboard side. What is the device that creates the sounds? You mentioned a microcontroller...
If would be helpful if you post either a basic diagram or a careful description of what the 65c22 connects to -- on the Apple side AND the Mockingboard side. What is the device that creates the sounds? You mentioned a microcontroller...
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
Re: Use a 65C22 as a level shifter too? (Apple IIe)
I think cbmeeks mentioned elsewhere that this is a Propeller project. That's a 3v3 chip, and it's a frequently asked question as to how to interface it to a 5V world. One answer is to use 1k series resistors for the Propeller's inputs:
There are other more complex circuits - try searching or image searching for
[parallax propeller 5v interface]
(That quote is from Chip Gracey, founder of Parallax and designer of the Propeller. Presumably the internal diodes can handle the currrent - 1.3V through 1k is 1.3mA. The diode has to dissipate 0.52mW. I think.)
Quote:
To input from a 5V system, a series resistor in the 1k-100k range is probably·the best approach.·There are parasitic catch diodes on every pin of the device which will clamp incoming out-of-range voltages to within ~0.4V of the VSS and VDD rails. This will force the resistor to drop 1.3V (5.0V-(3.3+0.4)) for an incoming high signal.
[parallax propeller 5v interface]
(That quote is from Chip Gracey, founder of Parallax and designer of the Propeller. Presumably the internal diodes can handle the currrent - 1.3V through 1k is 1.3mA. The diode has to dissipate 0.52mW. I think.)
Re: Use a 65C22 as a level shifter too? (Apple IIe)
BigEd wrote:
There are other more complex circuits - try searching or image searching for
[parallax propeller 5v interface]
[parallax propeller 5v interface]
... regarding which I have some misgivings. I'll explain.
Quote:
There are parasitic catch diodes on every pin of the device which will clamp incoming out-of-range voltages to within ~0.4V of the VSS and VDD rails. This will force the resistor to drop 1.3V (5.0V-(3.3+0.4)) for an incoming high signal.
Quote:
To output to a 5V system might be a simple matter if the threshold voltage is TTL (~1.4V) or CMOS (2.5V). You can connect straight in.
BigEd wrote:
That quote is from Chip Gracey, founder of Parallax and designer of the Propeller
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html