6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue Sep 24, 2024 1:24 pm

All times are UTC




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: W65C22 internal pullups
PostPosted: Mon Oct 21, 2013 1:46 pm 
Offline

Joined: Mon Mar 25, 2013 9:26 pm
Posts: 183
Location: Germany
Hey, just es short question. The 6526 used in the C64 had internal pullups and therefore an inverted logic was used to read the C64 keyboard (holding the currently scanned keyboard row LOW).
Are there also internal pullups on the W6522?
Mario.

EDIT: Sorry, small typo in the subject. I ment W65C22 not W64C22 :-)

_________________
How should I know what I think, until I hear what I've said.


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 21, 2013 5:19 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8392
Location: Midwestern USA
mkl0815 wrote:
Hey, just es short question. The 6526 used in the C64 had internal pullups and therefore an inverted logic was used to read the C64 keyboard (holding the currently scanned keyboard row LOW).
Are there also internal pullups on the W6522?
Mario.

EDIT: Sorry, small typo in the subject. I ment W65C22 not W64C22 :-)

Take a look at the data sheet and see if it says anything about pullups. I didn't see anything like that.

Attachment:
File comment: W65C22 Versatile Interface Adapter
VIA_w65c22.pdf [727.44 KiB]
Downloaded 71 times

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 21, 2013 6:33 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8514
Location: Southern California
No. The NMOS 6522, and even Rockwell's and Synnertek's and CMD's CMOS ones, and, I assume the NMOS 6526 also, had port inputs that looked like LSTTL which naturally pulls itself up. For my own uses, this caused problems sometimes, so I was very glad that the WDC 65c22 had CMOS inputs with virtually no leakage. If you want pull-ups, add them on the outside.

_________________
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?


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 21, 2013 7:38 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8392
Location: Midwestern USA
GARTHWILSON wrote:
No. The NMOS 6522, and even Rockwell's and Synnertek's and CMD's CMOS ones, and, I assume the NMOS 6526 also, had port inputs that looked like LSTTL which naturally pulls itself up. For my own uses, this caused problems sometimes, so I was very glad that the WDC 65c22 had CMOS inputs with virtually no leakage. If you want pull-ups, add them on the outside.

Also, note that the W65C22N has current limiting resistors and an open-drain IRQ output, whereas the W65C22S has no current limiting resistors and a totem-pole IRQ output.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 21, 2013 7:46 pm 
Offline

Joined: Mon Mar 25, 2013 9:26 pm
Posts: 183
Location: Germany
Ok, thanks. I had a look at the datasheet but I was nut sure if I got it right.
I was also looking to the R6532 datasheet (because I'm currently using this chip) and found the following text:

Quote:
When in the input mode, the peripheral output buffers are in the "1" state and the internal pull-up device acts as less then one TTL load to the peripheral data lines


I'm not sure if this is the same or if I misunderstand this part. In the W65C22 datasheet I found nothing about that, but if you can't see it, it does not automatically mean that it's not there :-)

Mario.

_________________
How should I know what I think, until I hear what I've said.


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 21, 2013 8:22 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8392
Location: Midwestern USA
mkl0815 wrote:
Ok, thanks. I had a look at the datasheet but I was nut sure if I got it right.
I was also looking to the R6532 datasheet (because I'm currently using this chip) and found the following text:

Quote:
When in the input mode, the peripheral output buffers are in the "1" state and the internal pull-up device acts as less then one TTL load to the peripheral data lines


I'm not sure if this is the same or if I misunderstand this part. In the W65C22 datasheet I found nothing about that, but if you can't see it, it does not automatically mean that it's not there :-)

Mario.

A feature that fundamental would be mentioned in the data sheet, as it will affect bus loading. You're trying to compare 1970s TTL logic to modern CMOS logic.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 21, 2013 8:36 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8514
Location: Southern California
As is not uncommon for WDC data sheets, the data sheet BDD posted contradicts itself.

On p.38, it says the input high current on PA and PB could be as much as 200uA, and the input low current could be 1.6mA, and I thought, "Darn! Don't tell me they went back to that!"

But then I found on p.32:
Quote:
Each PA line represents a CMOS capacitive load in the input mode and will drive two standard TTL loads in the output mode. The PA data port of the W65C22S has improved high impedance CMOS inputs, bus holding devices and high speed CMOS output drive for logic 1 level. This allows for higher speed operation no longer dependent on the RC time constant of older NMOS and CMOS designs.
and on p.34:
Quote:
The W65C22S PB lines represent one CMOS high impedance load with bus holding device in the input mode and will drive two TTL loads in the output mode. PB lines are also capable of sourcing 3.0 mA at 1.5 V in the output mode.

So despite the DC spec.s, the text says they're high-impedance CMOS, as I said above.

I will add however that my experiments show their output drive capability is more than ten times as strong as they say above.

So as we keep finding, their datasheet department is really messed up. Fortunately in most cases, the actual parts are much better than the data sheets say; but unfortunately, the only way to know for sure it to try it.

_________________
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?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 22, 2013 12:27 am 
Offline
User avatar

Joined: Mon Apr 23, 2012 12:28 am
Posts: 760
Location: Huntsville, AL
Garth:

I generally agree with you since we are generally talking about personal projects in this forum. However, I would caution anyone from using WDC's parts outside of their stated ranges as defined by the datasheet values for any commercial products that might result from the discussions on this forum.

The fact that WDC parts demonstrate performance far in excess of the values given in the datasheet will not be of any comfort, or provide any other recourse except a redesign, if at some future date the components begin to demonstrate performance in adherence to the datasheet values. The datasheet values are essentially the contract between WDC and its customers. If the customer insists on using its parts outside of the performance define by the datasheet values, WDC is not obligated in any way to replace parts or provide reimbursement for parts that no longer perform in the customer's design when those design depend on parameters beyond the stated values in the datasheet.

I almost never push any part beyond its datasheet values. It's almost always come back to haunt me. The one time that I agreed to push a part/design beyond its stated limits in the past fifteen years, because the customer insisted, that part/design resulted in a significant loss to the customer. So much so, that the product was withdrawn from the market completely.

As that experience reinforced, there's a reason why parts are not specified with higher performance. All the training that I received during my early years as an engineer was based on keeping designs within the specifications of the parts being used. If some parameter could not be satisfied, then a new part had to be selected or the design adjusted to avoid that condition. In many cases, there was some discrepancy in the datasheet values, and sometimes we used the part and sometimes not. If we used the part beyond its specifications, that use would not be because some fundamental value such as max frequency had to be exceeded.

I recall another case, where we decided to bid on some build-to-print jobs. I identified that the design, originally made by Emerson Electric, violated a critical parameter of the 68B09 microprocessor. Although I recommended no bidding the job, the company needed the work and we thought we could "fix" the design. Motorola had specifically limited the speed of the part, and we needed a part that operated at a frequency substantially more than the stated maximum frequency of the 68B09. What I've come to understand is that Emerson was a big account and doing a lot of work with that part, but we had a small production lot of 20-30 boards. Motorola was not going to test and specially bin the parts for us. They may have done so for Emerson, but our job was on the tail end of the 6809 life and it was not going to perform any special testing for such a small order. (Motorola was already binning the 6809, we were needing a 6809 whose performance exceeded the best of the lot parts. In other words, better than the best 6809 Motorola produced.) Needless to say that we had a hard time satisfying the order.

In this case, I suspect that WDC has several reasons why they specify their parts in the manner that they do: (1) they cannot exert full control over the process used to manufacture their parts; (2) they are not equipped or inclined to fully characterize the parts once they are delivered to them; (3) they are hedging the specifications to lower their liability; or (4) some combination of these three reasons. (There may be others, just as valid as these three.)

Thus, my recommendation is to buffer the part with external components if the data sheet values are insufficient for your application today or in the future. As the discussion on another thread indicates, it appears that WDC is experiencing a process issue with its 65C51 UART. As reported, it may simply be a design change, or as I suspect, it's a process/foundry change, and WDC did not adequately qualify the differences between the new supplier and the old.

_________________
Michael A.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 22, 2013 12:49 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8514
Location: Southern California
Quote:
The datasheet values are essentially the contract between WDC and its customers.

In normal cases, I would concur. WDC is different though. Years ago (almost 15?), I wrote the them about conflicting numbers in the '816 timing spec.s which, if they were both true, would keep the processor from working at all! (I don't remember exactly what the issue was, but it seems like it had to do with latching the bank byte.) IOW, the data sheet was obviously wrong. Bill Mensch himself wrote me back and said he could see what I meant but he didn't have an answer, and all he could recommend was to try moving the timing forward and back to find out what worked best.

Here though, I pointed out that the 65c22 data sheet contradicts itself. Both places cannot be right. It can't be a high-impedance CMOS input and at the same time require up to 1.6mA to pull it down.

_________________
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?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 22, 2013 12:54 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8392
Location: Midwestern USA
MichaelM wrote:
However, I would caution anyone from using WDC's parts outside of their stated ranges as defined by the datasheet values for any commercial products that might result from the discussions on this forum.

I have also said that, but have been castigated as being unreasonably conservative. Nothing in POC V1.0 or POC V1.1 violates any chip specification, primarily because as you noted, there's no telling what the future may bring. If WDC says the 65C816 can drive X TTL loads, I will take their word for it and not try to drive X+1 loads. It might work most of the time, but sooner or later a part will come along that just manages to make the specs. WDC doesn't fabricate their chips, therefore they don't have detailed control over the foundry that does the fabrication. As you note, the malfunctioning 65C51 is likely a victim of a production issue.

Quote:
(3) they are hedging the specifications to lower their liability;

Consider that some of their devices are qualified for medical implant. That's a really bad application in which to push the performance envelope. The poor bloke depending on his defibrillator to function when his heart malfunctions probably wouldn't appreciate a defibrillator malfunction at that critical moment in time. :D

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 22, 2013 1:36 am 
Offline
User avatar

Joined: Mon Apr 23, 2012 12:28 am
Posts: 760
Location: Huntsville, AL
GARTHWILSON wrote:
Here though, I pointed out that the 65c22 data sheet contradicts itself. Both places can't be right. It can't be a high-impedance CMOS input and at the same time require up to 1.6mA to pull it down.

I can't say that I disagree with you that it's a contradiction. However, like the active pull-up circuitry of the 8051 I/O ports, it's possible that there's something somewhat different for the pull-ups on these pins since, as I understand these ports, they can be configured for input and for output.

Further, it's not unreasonable to specify that a driver for these inputs must sink 1.6mA. That's not to say that requiring a 1.6mA sink on a supposedly high input impedance circuit is not a bit unusual. But how difficult is it provide a driver that sinks at least 1.6mA. Any reasonable driver for 1 MHz operation will be able to sink at least 1.6mA or more. I can think of many CMOS/TTL logic drivers that can sink far more than that.

I can't visualize the internal circuitry that might be implemented for these pull-ups. Whatever that circuitry may be, my interpretation is that an active driver is required not just a series resistor and a contact to ground. If the input connection is controlled through a resistor and contact, then I would say that the resistor must be 156 Ohms or less: 0.0016 * 156 = 0.25V (a strong logic low level).

_________________
Michael A.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 22, 2013 3:34 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8514
Location: Southern California
The data sheet BDD posted shows the output on page 33. The Sep 13, 2010 WDC 65c22 data sheet has more diagrams & info on page 32, 33, 34, and 35, comparing their (always) totem-pole CMOS output on the W65C22S and their inputs, to GTE's and Rockwell's which often have resistors in the pull-up circuit.

One application where I remember having problems was a fixture I made to test a 65c02 for information that was not in the data sheet, by using the workbench computer to control what instructions to give it and what cycle in each instruction to generate an NMI. All 16 bus bits of the processor under test, as well as its phase 0, R/W, Sync, RDY, NMI, IRQ, and RST went to I/O pins of VIAs on the workbench computer. (I had to use two VIAs, as one is not enough for so many lines.) My program printed the state of both buses and all these other pins at every cycle, one printed line per cycle. (It turns out that it would respond to NMI and start the interrupt sequence immediately when the instruction was done, without starting another instruction first, even if the interrupt hit during the last cycle, and even if an interrupt applied in an earlier cycle were removed before the instruction was finished.) Just to be safe, I connected the data lines to VIA pins through 3.3K resistors to avoid contention, in case I goofed in my program and made both to be outputs at the same time. Maximum current then would be only 1.5mA per pin. With the Rockwell VIA, it wouldn't work that way. The VIA inputs appeared to be high whether the processor data lines were trying to pull them down or not. I had to take out the resistors.

There have been other times too, where I wanted to drive them with something other than logic ICs, like having a passive pull-down so they would appear low unless something pulled them up. With a 150-ohm resistor there, the devices pulling them up would have to be too strong. To get even 2.4V on 150 ohms, you need 16mA per pin! Sure, you could add another IC for a driver, but why add more parts (possibly requiring an additional board) when you could just use the W65C22S with CMOS inputs. Coincidentally, Justin just posted an hour ago at viewtopic.php?f=4&t=2735&p=29889#p29889 that he found a problem keeping his circuit from working was the NMOS 6522 not being able to pull up hard enough. A CMOS one would have had plenty of headroom to spare, being able to pull up much harder than needed.

_________________
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?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 22, 2013 5:40 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8392
Location: Midwestern USA
GARTHWILSON wrote:
The data sheet BDD posted shows the output on page 33. The Sep 13, 2010 WDC 65c22 data sheet has more diagrams & info on page 32, 33, 34, and 35, comparing their (always) totem-pole CMOS output on the W65C22S and their inputs, to GTE's and Rockwell's which often have resistors in the pull-up circuit.

The 65C22 data sheet I posted is dated Sept 13, 2010 and has the illustrations to which you refer.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 22, 2013 5:48 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8514
Location: Southern California
BigDumbDinosaur wrote:
The 65C22 data sheet I posted is dated Sept 13, 2010 and has the illustrations to which you refer.

Woops, I was comparing two, side by side, and forgot which was which. The only date I can find on the other one is on page 2 where it says, "Copyright 1981-2006."

_________________
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?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC


Who is online

Users browsing this forum: ccureau and 50 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: