6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 11:56 am

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: VIC 20 Clock circuit
PostPosted: Tue Dec 01, 2020 6:32 pm 
Offline

Joined: Wed Nov 04, 2015 11:10 am
Posts: 51
My VIC 20 has a 7402 to produce the clock signal for the system and I tried to replace it with a 74LS132, which didn't work. The Oscilloscope shows a nice signal, but the VIC doesn't work with it. A 74LS02 doesn't work either. Any Ideas?


Top
 Profile  
Reply with quote  
 Post subject: Re: VIC 20 Clock circuit
PostPosted: Tue Dec 01, 2020 7:22 pm 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 730
Location: Tokyo, Japan
A 7402 is a quad 2-input NOR gate but a 74LS132 is a quad 2-input NAND gate with a different pinout, so it's no suprise that that didn't work.

As far as the 74LS02, there could be timing issues there, since it has slightly different specs from the 7402.

I found a couple of VIC-20 schematics here for E ("older") and N ("newer") versions of the VIC-20. I assume that yours is the N version, since that seems to be the only one with a 7402 (the E version uses a 74S02), but you'll stand a better chance of getting help if you can point people at schematics you've confirmed are for your system and identify which chip you're talking about.

On the N board a 74LS02 (UC3) is used for the 6502 clock and some other things, yet a 7402 (UB9, which I assume is the chip you're talking about) for the 6560's 4.433618 MHz clock. Given that it would be easier to use the same chip for both, I would assume that there's a good reason they didn't, which may support the timing issue theory.

_________________
Curt J. Sampson - github.com/0cjs


Top
 Profile  
Reply with quote  
 Post subject: Re: VIC 20 Clock circuit
PostPosted: Wed Dec 02, 2020 6:24 am 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
There's a fairly good chance that a 74HCT02 would work as a replacement.

The original TTL and LS families had similar propagation delays, but LS reduced power consumption by simultaneously increasing input impedance and reducing output drive - the latter generally proving more relevant to system design, especially in a heavily loaded signal like a clock buffer. The HCT family has much better output drive than LS, especially upward, and retains very similar propagation delays to original TTL.

It looks like there are some trimming capacitors in the oscillator circuit. It's conceivable that these would need to be adjusted when changing the logic family driving them. If you have good oscillation, however, you probably don't need to worry about it.


Top
 Profile  
Reply with quote  
 Post subject: Re: VIC 20 Clock circuit
PostPosted: Wed Dec 02, 2020 9:26 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
I've socketed and re-chipped multiple Vic-20 machines over the years. The 7402 that drives the 6560 needs to have higher voltage swing outputs... i.e., a 74HC02 will not work, albeit a 74HCT02 sorta works (dropouts happen). I suggest either a 7402 or 74F02, which both work fine.

Also, the trimmer cap in the oscillator section will need to be adjusted if you swap out the chip. It's frequency is divided by 4 to derive the colorburst frequency (3.579545 MHz). The simplest way to adjust it is having a color monitor attached directly to the video output (bypassing the RF modulator). You'll find that the color border (CYAN by default) will cycle a bit and then you lose color and possibly sync (monitor dependent). FInd the high/low ends and center the trimmer... then let it warm up for a good hour and repeat the adjustment.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: VIC 20 Clock circuit
PostPosted: Wed Dec 02, 2020 9:47 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
floobydust wrote:
I've socketed and re-chipped multiple Vic-20 machines over the years. The 7402 that drives the 6560 needs to have higher voltage swing outputs... i.e., a 74HC02 will not work, albeit a 74HCT02 sorta works (dropouts happen). I suggest either a 7402 or 74F02, which both work fine.

Can you clarify this; because 74HC(T)__'s outputs will swing all the way to both rails. Are you saying the load is too heavy for 74HC(T)?

_________________
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  
 Post subject: Re: VIC 20 Clock circuit
PostPosted: Wed Dec 02, 2020 9:58 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
GARTHWILSON wrote:
floobydust wrote:
I've socketed and re-chipped multiple Vic-20 machines over the years. The 7402 that drives the 6560 needs to have higher voltage swing outputs... i.e., a 74HC02 will not work, albeit a 74HCT02 sorta works (dropouts happen). I suggest either a 7402 or 74F02, which both work fine.

Can you clarify this; because 74HC(T)__'s outputs will swing all the way to both rails. Are you saying the load is too heavy for 74HC(T)?


I've not scoped the output swing to the 6560, but using the 74HCT02 turned out to be a bit unstable. This is why I purchaed some new 7402 and 74F02 chips... the 6560 datasheet also specifically states that the inverted outputs that form the clock signals should be non-overlapping, so perhaps the HCT chip was an issue there as well. Over time, there have been at least 3 variations of the clock circuit for the Vic-20:
1- (two 7404 inverters and two 7402 gates)
2- four 7402 gates with the output drivers cross-connected
3- four 7402 gates with the output drivers having both inputs tied together (acting as an inverter)

I suspect Commodore had some issues as well with the various chips they sourced which required the circuit changes. I would also note that the 7402 under the metal shield was always soldered in, while the 6560 was socketed... at least on all the ones I've managed to have open.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: VIC 20 Clock circuit
PostPosted: Thu Dec 03, 2020 7:58 am 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
Curious. If timing is that critical and the 74HCT kinda works, then perhaps a 74ACT or 74AHCT version would be better. They have similar input and output voltage characteristics to 74HCT, but a much shorter Tpd. The 74ACT also has a faster slew rate on output.


Top
 Profile  
Reply with quote  
 Post subject: Re: VIC 20 Clock circuit
PostPosted: Thu Dec 03, 2020 1:11 pm 
Offline

Joined: Wed Nov 04, 2015 11:10 am
Posts: 51
Chromatix wrote:
There's a fairly good chance that a 74HCT02 would work as a replacement.

The original TTL and LS families had similar propagation delays, but LS reduced power consumption by simultaneously increasing input impedance and reducing output drive - the latter generally proving more relevant to system design, especially in a heavily loaded signal like a clock buffer. The HCT family has much better output drive than LS, especially upward, and retains very similar propagation delays to original TTL.

It looks like there are some trimming capacitors in the oscillator circuit. It's conceivable that these would need to be adjusted when changing the logic family driving them. If you have good oscillation, however, you probably don't need to worry about it.


The board I am referring to is an NTSC with an assembly number of: 324003 and the chip number is UB4. The memory is all 2114's. Could it be solved with pull-up resistors on the outputs feeding the 6560?


Top
 Profile  
Reply with quote  
 Post subject: Re: VIC 20 Clock circuit
PostPosted: Thu Dec 03, 2020 2:53 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
Per Vic-20 schematics, there are already pull-up resistors on the gate outputs driving the 6560. I've seen 220 ohm used as well as 560 ohm. As per my earlier post, I suggest using either a 7402 or 74F02 and adjust the trimmer capacitor.

Attachment:
mos_6560_6561_vic.pdf [7.44 MiB]
Downloaded 67 times

Attachment:
Commodore-VIC20-Schematic-324001-Page-1.png
Commodore-VIC20-Schematic-324001-Page-1.png [ 111.27 KiB | Viewed 2326 times ]

Attachment:
Commodore-VIC20-Schematic-324001-Page-2.png
Commodore-VIC20-Schematic-324001-Page-2.png [ 137.36 KiB | Viewed 2326 times ]

Attachment:
Commodore-VIC20-Schematic-324001-Page-3.png
Commodore-VIC20-Schematic-324001-Page-3.png [ 136.19 KiB | Viewed 2326 times ]

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: VIC 20 Clock circuit
PostPosted: Thu Dec 03, 2020 4:23 pm 
Offline

Joined: Wed Jul 18, 2018 12:12 pm
Posts: 96
Curious Marc did a series recently fixing six different HP 98035 clock modules. In one of them he found that the new inverter chip he installed for the clock generation did not work and traced it down to the different analog specifications/characteristics of different chips. He wound up changing the value of a feedback resistor to a lower resistance which took care of the issue. He goes over it about the 20 minutes mark in this video.

https://www.youtube.com/watch?v=Jh2sLavN2_o


Top
 Profile  
Reply with quote  
 Post subject: Re: VIC 20 Clock circuit
PostPosted: Sun Dec 06, 2020 11:28 am 
Offline
User avatar

Joined: Thu May 14, 2015 9:20 pm
Posts: 155
Location: UK
So there are four things here:
  • For the crystal oscillator, any different technology 74xxx02 chip will likely require changes to the resistors, as the different technologies all have different analogue characteristics (including different input and output stages),
  • The oscillator is running at a fairly high frequency (this type of oscillator gets more tricky to get to be reliable as the wanted oscillator frequency is increased),
  • The 6560 appears to need rail to rail signals on its clock input pins. So forget using 74LS02 or other types with similar outputs, as they cannot drive their outputs high enough,
  • The two clock signals can’t overlap.

Oh, and it’s not normally recommended to pick up a signal from the middle of this type of oscillator. Best practice is to feed through another gate to help sharpen up the signal. Remember, the oscillator is operating in a quasi analogue mode, the signals may not be at normal (valid) logic levels.

I’m not surprised that Commodore had trouble with this design. That’s quite a list of requirements for one chip...

It would have been easier with trying replacements if they had kept the split between the oscillator function and the drive to the 6560 between different chips on all versions so that we could better match the requirements.

Certainly modern 74 series CMOS chips outputs should have little problem producing a rail to rail output suitable for the 6560. But will need the resistors in the oscillator changing so that the oscillation is at the correct frequency and start up and running is reliable.

Pull-up resistors help a little, but keep in mind at that frequency, their value has to be be low. Otherwise the time that they take to charge up the stray and input stage capacitance will be too long. At the same time, the value can’t be so low that the output stage can’t drive the line low enough, and fast enough...

Definitely use of a good two channel ‘scope is strongly recommended here, so that you can see what’s working and what’s not.

Mark


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

All times are UTC


Who is online

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