6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Mar 29, 2024 10:57 am

All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: MOS 6529 replacement?
PostPosted: Thu Oct 09, 2014 8:34 pm 
Offline

Joined: Thu Oct 09, 2014 8:30 pm
Posts: 5
Hello I'm fixing a Commodore 16 and I need to replace the MOS 6529B (datasheet) that handles keyboard communications. Is there a modern compatible solution (preferably single chip) that I could use, perhaps with TTL chips?


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 09, 2014 11:23 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8114
Location: Midwestern USA
Yrouel wrote:
Hello I'm fixing a Commodore 16 and I need to replace the MOS 6529B (datasheet) that handles keyboard communications. Is there a modern compatible solution (preferably single chip) that I could use, perhaps with TTL chips?

The 6529 resembles a 6520 or 6521 PIA with only one output port. That might be worth looking at, since it's not very likely you'll find an exact replacement readily available.

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 10, 2014 2:30 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3328
Location: Ontario, Canada
hello Yrouel, and welcome. :)

if a single chip alternative is possible I think it would have to be some sort of programmable logic -- a CPLD or perhaps a PAL or GAL. I'm sure a CPLD could do it but you might prefer not to go that route. Depending which product you select, the form factor and pinout might not match the original, so you'd be obliged to hack together some sort of adapter, even though you're only dealing with a single chip.

You might prefer to build an equivalent circuit using 74xx series logic ICs. Various solutions are possible but certainly you would need at least three or four ICs. For example, the input function could be done by a 74hct245 or '244, and the output function could use a 74hct377 (octal D flipflop with data enable). Then there'd be a couple of 74LS07 to serve as Open Collector buffers for the '273. That's not quite 100% complete, but do you see the basic idea? Do you have the skills to build such a thing? If it's something you're comfortable with then I'll describe the details.

BTW it might be helpful if you could direct us to a schematic for the Commodore 16.

cheers,
Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 10, 2014 2:44 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8412
Location: Southern California
I was aware of the 6529's existence but never paid any attention to it until now. Wow, it's simple! There's not even a phase-2 input, and no data-direction register. It just uses open-drain outputs instead so if you want input, you just quit pulling the output down, like for I²C. You could do it with discrete logic on a tiny board.

_________________
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: Fri Oct 10, 2014 3:56 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8114
Location: Midwestern USA
GARTHWILSON wrote:
I was aware of the 6529's existence but never paid any attention to it until now. Wow, it's simple! There's not even a phase-2 input, and no data-direction register. It just uses open-drain outputs instead so if you want input, you just quit pulling the output down, like for I²C. You could do it with discrete logic on a tiny board.

The 6529 is little more than a dumb bus transceiver, so perhaps something like a 74xx245, with a little glue logic for chip selects, etc., could be pressed into service.

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 10, 2014 4:17 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3328
Location: Ontario, Canada
GARTHWILSON wrote:
Wow, it's simple!
BigDumbDinosaur wrote:
The 6529 is little more than a dumb bus transceiver
It's not that simple, BDD. Unlike a transceiver, the 6529 has an output latch that captures & retains write data -- check out the Write Cycle Timing Diagram. So you'll need more than a 74xx245 with a little glue logic. The recipe isn't complete without a byte-wide latch or flipflop. (And Open Collector buffers, of course, but maybe that falls in the "glue" category.)

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 10, 2014 8:38 am 
Offline

Joined: Thu Oct 09, 2014 8:30 pm
Posts: 5
Yes I'm comfortable building some compatibility board, it's the design part I'm lacking of :(
Here the service manual for the C16 which also contains schematics.

Looking at 74xxx logic I found the 74xx573 (datasheet), can it be used alone?


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 10, 2014 1:17 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3328
Location: Ontario, Canada
Yrouel wrote:
Looking at 74xxx logic I found the 74xx573 (datasheet), can it be used alone?
No, you will need more than that. But I think a three-chip solution might be possible. That means using discrete logic on a tiny board as Garth suggested. You would remove the 6526 and run 20 connections from its location to the new board. The wires going to the new board should be kept reasonably short -- 10 inches, maybe, or less if you can manage it. Does this sound doable?

But first it's best to ask why you believe the 6529 is defective. What symptoms did you observe, and what tests did you run? Naturally I'm trying to be helpful, not critical. The problem might lie elsewhere, in which case the effort of building a new board would be wasted -- and the problem would still remain! :cry: :cry: :cry:

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 10, 2014 2:29 pm 
Offline

Joined: Thu Oct 09, 2014 8:30 pm
Posts: 5
The C16 boots fine and I see the ready prompt but the keyboard doesn't work. The C16 boots fine also without that chip installed (I already socketed it) so at least is not a vital chip.
I tested the keyboard in a C64 (I have only one C16) which while not perfectly compatible showed me that pressing random keys produced some output so I'm fairly confident the keyboard itself works. I checked continuity on the connections on the board and it seems all fine.
Being the 6529 used between the keyboard and the rest of the bus my best bet is that's the issue here.

As the board goes I should have a 20 pin wire wrap socket which should then be long enough to plug a board directly on the socked on the C16 motherboard (or I'll use something else for the same purpose). I already had to do something like that for the adaptor to replace the PLA with an EEPROM.


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 10, 2014 3:09 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3328
Location: Ontario, Canada
Yrouel wrote:
Being the 6529 used between the keyboard and the rest of the bus my best bet is that's the issue here.
Okay, what you're saying seems reasonable. Question, though -- do the joysticks work properly?
Attachment:
Commodore 16 partial schematic.gif
Commodore 16 partial schematic.gif [ 93 KiB | Viewed 3386 times ]
As I see it, the 6529 drives the keyswitch matrix, which, if a switch is pressed, sends a logic low signal to the TED chip -- whatever that is; I'm not a Commodore expert! :D My point is, maybe it's the TED chip which isn't working -- and the joysticks would reveal that. That's because, in addition to the keyboard, the TED chip also receives logic lows when the joystick is used. So if the joysticks are OK then that's a sign that the TED chip is working.

BTW "not working" doesn't necessarily mean defective. Both the TED chip and the 6529 require signals such as chip select which come from elsewhere. Before we build a new board, let's be 100% sure it's the 6529 that's defective -- not the TED, or the chip-select circuitry or whatever.

Also BTW, it seems to me the read (input) function of the 6529 isn't used. :!: Can anyone give a second opinion on that? Yes they've made a connection to the R/W pin, but I can't imagine how reading from the 6529 would serve any useful purpose -- I believe it's only ever written to. Thoughts?

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 10, 2014 3:17 pm 
Offline

Joined: Thu Oct 09, 2014 8:30 pm
Posts: 5
I can't test the joystick ports at the moment since the C16 has a different connector than the C64 (and other machines of that era) so my joystick can't be connected. However I'm fairly sure that TED is working, if it wasn't I would've other issues since it handles a lot of stuff in the system like the video.


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 10, 2014 3:20 pm 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1918
Location: Sacramento, CA, USA
Maybe I'm just being a bit goofy, but wouldn't the best replacement for a MOS 6529B be another MOS 6529B?

There should be thousands of them floating around the world, and hundreds of them should still be within your reach, no?

Mike


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 10, 2014 5:29 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3328
Location: Ontario, Canada
Yrouel wrote:
I'm fairly sure that TED is working, if it wasn't I would've other issues since it handles a lot of stuff in the system like the video.
That's not 100% conclusive, although it is reassuring. But remember it's possible some parts of the TED chip work and others don't. We also haven't ascertained whether the 6529 is getting a proper chip-select signal -- or, as Mike says, whether it might be easiest to test it simply by replacement!

But you seem eager to proceed, so here's my version of a 6529 replacement. Just understand I can't promise this'll work, because:
  1. it's possible the original 6529 is not defective
  2. the data sheet is vague on certain details
  3. although I doubt it, I may be wrong about the C16 not using the 6529's input facility (as noted in the last paragraph of my previous post). 2nd opinion anyone? I have omitted that functionality to simplify the board.

Regarding point b, one thing the datasheet doesn't say is whether the output data gets inverted. I assume not, but if it does then simply take out the 'LS07's and use 'LS05's or 'LS06's instead. You're gonna use sockets anyway, right? :wink:

-- Jeff
Attachment:
6529 replacement for Commodore 16.gif
6529 replacement for Commodore 16.gif [ 5.43 KiB | Viewed 3375 times ]

http://www.nxp.com/documents/data_sheet/74HC_HCT377.pdf

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 10, 2014 7:01 pm 
Offline

Joined: Fri Jan 17, 2014 6:39 pm
Posts: 47
Location: Poland
74ls647 :)


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 10, 2014 7:21 pm 
Offline

Joined: Thu Oct 09, 2014 8:30 pm
Posts: 5
@Dr Jefyll thank you very much, it'll be few days since I gather the parts for it I'll let you know as soon as I've tested it :)

@grzeg that chip seems very promising, thanks


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 9 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: