UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > Specific Vintage Equipment > Vintage Computers

Notices

Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment.

Reply
 
Thread Tools
Old 13th Oct 2023, 5:36 pm   #21
Mark1960
Octode
 
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,241
Default Re: Commodore PET 4032 apparent 6520 failure

There doesn’t seem to be a pullup on the diag line, so relying on the 74ls00 floating high. Could it be pulled high with a resistor to 5v, maybe 1k-4.7k range.
Mark1960 is online now   Reply With Quote
Old 13th Oct 2023, 5:43 pm   #22
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,380
Default Re: Commodore PET 4032 apparent 6520 failure

I think Mark means try putting a resistor (value between 1K - 4K7) between +5V and the DIAG line.

Relying on the 74LS input to keep the line high unless taken low seems like very bad practice to me, and it's even more baffling when you get to the 3016 which doesn't have the UD5 gate on the DIAG line - only the 6520 pin.

The 6520 pin must sometimes (under control of the firmware) go into output mode in order to control the speaker / buzzer audio gate, but presumably when it is doing that it does not try to read the pin as an input.
SiriusHardware is online now   Reply With Quote
Old 13th Oct 2023, 6:02 pm   #23
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,740
Default Re: Commodore PET 4032 apparent 6520 failure

So find a 5v feed and connect it with a resistor in line to UB12 pin 9?

Colin.
ScottishColin is offline   Reply With Quote
Old 13th Oct 2023, 6:29 pm   #24
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,380
Default Re: Commodore PET 4032 apparent 6520 failure

Or to UD5 (2). Either / or.
SiriusHardware is online now   Reply With Quote
Old 13th Oct 2023, 10:54 pm   #25
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,740
Default Re: Commodore PET 4032 apparent 6520 failure

OK - UD5/2 with 5V and the resistor inline boots OK consistently. With it removed, it drops to the monitor.

Colin.
ScottishColin is offline   Reply With Quote
Old 13th Oct 2023, 11:13 pm   #26
Mark1960
Octode
 
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,241
Default Re: Commodore PET 4032 apparent 6520 failure

It seems like one of the devices on that input has maybe been damaged, but not destroyed.

I think you swapped the 6520 and didn’t see any improvement, so maybe you stressed the input of the 74LS00.

You could also just leave the resistor fitted, inputs shouldn’t really be left floating.
Mark1960 is online now   Reply With Quote
Old 14th Oct 2023, 12:22 am   #27
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,740
Default Re: Commodore PET 4032 apparent 6520 failure

So does this mean that swapping the 74LS00 is a sensible thing to try? I have already swapped the 6520.

Colin.



Quote:
Originally Posted by Mark1960;1592[B
[/B]637]It seems like one of the devices on that input has maybe been damaged, but not destroyed.

I think you swapped the 6520 and didn’t see any improvement, so maybe you stressed the input of the 74LS00.

You could also just leave the resistor fitted, inputs shouldn’t really be left floating.
ScottishColin is offline   Reply With Quote
Old 14th Oct 2023, 7:59 am   #28
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,380
Default Re: Commodore PET 4032 apparent 6520 failure

The machine has, historically, somehow, worked without a pullup resistor on the DIAG line so the 'right' way to fix it is probably to replace the 74LS00 and remove the pullup resistor to see if that gets it working as-was. With the 6520 (hopefully) ruled out, the only other device on that node which could be causing abnormal behaviour is the 74LS00.

You could also take the pragmatic approach and solder the resistor permanently in place on the underside of the PCB.

My preference would be to get it working exactly as it was originally, but not everyone is as fussy as I am.
SiriusHardware is online now   Reply With Quote
Old 14th Oct 2023, 10:12 am   #29
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,740
Default Re: Commodore PET 4032 apparent 6520 failure

I'd rather it was like it was too. I'll remove it and try the 'spare' I have in the MK14 and let you know.

Colin.

Quote:
Originally Posted by SiriusHardware View Post
The machine has, historically, somehow, worked without a pullup resistor on the DIAG line so the 'right' way to fix it is probably to replace the 74LS00 and remove the pullup resistor to see if that gets it working as-was. With the 6520 (hopefully) ruled out, the only other device on that node which could be causing abnormal behaviour is the 74LS00.

You could also take the pragmatic approach and solder the resistor permanently in place on the underside of the PCB.

My preference would be to get it working exactly as it was originally, but not everyone is as fussy as I am.
ScottishColin is offline   Reply With Quote
Old 17th Oct 2023, 12:40 am   #30
ortek_service
Octode
 
ortek_service's Avatar
 
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,338
Default Re: Commodore PET 4032 apparent 6520 failure

Quote:
Originally Posted by SiriusHardware View Post
That was mentioned earlier,

Quote:
UB12/9 and UD5/2 both start low at power up and then both go to 1.17V after a few seconds.
Both pins are connected to the DIAG line in the 4032. I can't see a pullup resistor anywhere on that line in the 4032, but I think if it is not logic 1 / high then it will tend to stick in that 'Enter the monitor' loop.

If it's hovering low even with the 6520 removed then I'm leaning towards a problem with the input on UD5 (2). However the extremely high resistance seen between the UD5 pin and 0V with UB12 removed doesn't make UD5 an obvious culprit.
Thanks - It looks like I hadn't spotted that UB12 was the 6520, as schematic had it marked as UB2, so hadn't associated that pin 9 was connected to /DIAG.
ortek_service is offline   Reply With Quote
Old 17th Oct 2023, 1:21 am   #31
ortek_service
Octode
 
ortek_service's Avatar
 
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,338
Default Re: Commodore PET 4032 apparent 6520 failure

Quote:
Originally Posted by Mark1960 View Post
There doesn’t seem to be a pullup on the diag line, so relying on the 74ls00 floating high. Could it be pulled high with a resistor to 5v, maybe 1k-4.7k range.
Quote:
Originally Posted by SiriusHardware View Post
I think Mark means try putting a resistor (value between 1K - 4K7) between +5V and the DIAG line.

Relying on the 74LS input to keep the line high unless taken low seems like very bad practice to me, and it's even more baffling when you get to the 3016 which doesn't have the UD5 gate on the DIAG line - only the 6520 pin.

The 6520 pin must sometimes (under control of the firmware) go into output mode in order to control the speaker / buzzer audio gate, but presumably when it is doing that it does not try to read the pin as an input.

Quote:
Originally Posted by SiriusHardware View Post
The machine has, historically, somehow, worked without a pullup resistor on the DIAG line so the 'right' way to fix it is probably to replace the 74LS00 and remove the pullup resistor to see if that gets it working as-was. With the 6520 (hopefully) ruled out, the only other device on that node which could be causing abnormal behaviour is the 74LS00.

You could also take the pragmatic approach and solder the resistor permanently in place on the underside of the PCB.

My preference would be to get it working exactly as it was originally, but not everyone is as fussy as I am.

Quote:
Originally Posted by ScottishColin View Post
I'd rather it was like it was too. I'll remove it and try the 'spare' I have in the MK14 and let you know.

Colin.

Well the 74LS00, being 'true' TTL, inherently effectively has a reasonably-strong pull-up by its input-transistors with their emitters connected to the inputs - which need a fair amount of sink current (although not as much as original 74xx family) on an output to driving a 74LSxx input low.

So (unlike CMOS families) the inputs should never normally actually 'float' as such. But it does seem there's been some damage to the 74LS00 input that is preventing it sourcing enough current from its input / it has developed a high-leakage to ground, that is pulling this down.

I wonder if the 6520 also normally has some weak pull-ups on its port-lines, when configured as inputs (which might explain why 3016 works without the 74LS00), but leakage to ground on the faulty? 74LS00 in the 4032 is preventing the /DIAG line going above logic-high threshold.


On the 4032, I presume UB12(6520)/pin9 (PA7) is only normally driven-low, in order to drive the speaker and relies on (effective) pull-ups internal-to IC's inputs to make UD5(74LS00)/pin2 high.
- As if UB12(6520)/pin9 (PA7) is ever set high, then pulling /DIAG low would short UB12(6520)/pin9 etc. out.

Although it may have been advisable to have had a protection resistor in-line with the DIAG pin, to prevent possible damage to the 6520 if /DIAG was shorted to ground, whilst being driven by 6520 PA7 if not protected too-well against that. It would also help prevent damage if a voltage above 6520 supply was applied to /DIAG (Inc. ESD-spikes), although some ESD-clamp diodes would also be advisable.
But it's probably not too-easy to retro-fit a series resistor etc, without permanent track-cuts etc.

It seems like Commodore saved a few pence/cents, by omitting a series-protection / true pull-up external resistor on /DIAG etc.

Last edited by ortek_service; 17th Oct 2023 at 1:28 am.
ortek_service is offline   Reply With Quote
Old 17th Oct 2023, 8:50 am   #32
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,380
Default Re: Commodore PET 4032 apparent 6520 failure

Quote:
I presume UB12(6520)/pin9 (PA7) is only normally driven-low, in order to drive the speaker and relies on (effective) pull-ups internal-to IC's inputs to make UD5(74LS00)/pin2 high - As if UB12(6520)/pin9 (PA7) is ever set high, then pulling /DIAG low would short UB12(6520)/pin9 etc. out.
I was trying to get my head around that possible clash with the PA7 pin set to output and set high and then someone shorting the DIAG input to ground. You're suggesting that the PA7 pin is used in pseudo "open-collector" mode and is only ever in input mode or switched to output mode with its output latch always set low. That's not a bad way to imagine it working (when it's working normally).

I think we'd better give Colin a chance to get back to us on whether the surgery on the 74LS00 was successful before we add too much more to the thread.
SiriusHardware is online now   Reply With Quote
Old 18th Oct 2023, 1:04 pm   #33
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,740
Default Re: Commodore PET 4032 apparent 6520 failure

Hi. All sorted thanks. I've some new ICs on the way to replace the one I nicked from my MK14.

I'll let it settle and think about adding a reset switch. I believe there is a way that a switch can drop the PET into the monitor using the DIAG line; I wonder if my problem was ever related to that.

See this quote:
"This is true, but there is help. If you hold down the diagnostic
sense line (user port pin 5), you'll end up in the monitor instead
of doing the full reset thingie. A PET at our school's computer club
had a smart thing with a switch wired to reset, and diag through a
condensator. If you flicked it quicky it would reset; if you kept the
switch in the alternate position a few seconds it would decharge the
condensator, pull down diag, and when switched back you came back in
the monitor."

from here:

https://www.commodore.ca/wp-content/..._PET_notes.txt

Colin.
ScottishColin is offline   Reply With Quote
Old 18th Oct 2023, 2:30 pm   #34
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,380
Default Re: Commodore PET 4032 apparent 6520 failure

The line of investigation regarding the DIAG line was based on the knowledge (from the internet) that in order to get into the built in monitor, one way to do it is to take the DIAG line low.

Since you were apparently stuck in the monitor it seemed possible that DIAG was being held low somehow and that did prove to be the case as you measured it at around 1.16 - 1.17V, so you had to find out why that was and through a process of elimination of the ICs on the DIAG line (a mere two) you seem to have found that it was the 74LS00 which was the culprit. Quite how it ended up getting zapped as a result of something you were doing with the cassette port, we'll probably never know. I presume you were trying to draw power for something from the cassette port, but we don't know what that something was or what else on the PET it was connected to.

The dodge you've quoted sounds like it is meant to hold the DIAG line low after reset is released, but only after reset has been held down for a while longer than usual. I think it would need more than just a switch and a capacitor, there would need to be at least a resistor involved so that the capacitor did not discharge instantly as soon as the switch was pressed otherwise the machine would always go straight into the monitor after any reset press / release, no matter how short. Also, when starting the machine from cold the capacitor would already be discharged and would tend to always take the machine into the monitor at power-on.

If this is a viable hack, I would be amazed if the wiring / circuit has not already been described in detail on the internet.
SiriusHardware is online now   Reply With Quote
Old 18th Oct 2023, 4:04 pm   #35
ScottishColin
Octode
 
Join Date: May 2012
Location: Perth, Scotland
Posts: 1,740
Default Re: Commodore PET 4032 apparent 6520 failure

Yes - I've seen plenty of pages and vidoeos regarding fitting a reset switch but fitting something that drops to the monitor is very difficult to find a definitive document.

It doesn't help that the pins are seemingly different on different PET models either.

I was plugging in my Stupid PET Tricks device which gives joystick capabilities, easy sound output and internet access from the PET and plugged the power tap in upside down on the Cassette Port. Completely self inflicted.

https://www.bit-zeal.com/product/stu...ricks-module/3

Colin.

Quote:
Originally Posted by SiriusHardware View Post
The line of investigation regarding the DIAG line was based on the knowledge (from the internet) that in order to get into the built in monitor, one way to do it is to take the DIAG line low.

Since you were apparently stuck in the monitor it seemed possible that DIAG was being held low somehow and that did prove to be the case as you measured it at around 1.16 - 1.17V, so you had to find out why that was and through a process of elimination of the ICs on the DIAG line (a mere two) you seem to have found that it was the 74LS00 which was the culprit. Quite how it ended up getting zapped as a result of something you were doing with the cassette port, we'll probably never know. I presume you were trying to draw power for something from the cassette port, but we don't know what that something was or what else on the PET it was connected to.

The dodge you've quoted sounds like it is meant to hold the DIAG line low after reset is released, but only after reset has been held down for a while longer than usual. I think it would need more than just a switch and a capacitor, there would need to be at least a resistor involved so that the capacitor did not discharge instantly as soon as the switch was pressed otherwise the machine would always go straight into the monitor after any reset press / release, no matter how short. Also, when starting the machine from cold the capacitor would already be discharged and would tend to always take the machine into the monitor at power-on.

If this is a viable hack, I would be amazed if the wiring / circuit has not already been described in detail on the internet.
ScottishColin is offline   Reply With Quote
Old 18th Oct 2023, 5:19 pm   #36
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,380
Default Re: Commodore PET 4032 apparent 6520 failure

It wouldn't be hard to knock up a proper small electronic circuit - either using TTL / CMOS or a small 8-pin microcontroller like a PIC12F629 - to add that 'long press to go into the monitor' function to a reset switch but it would involve placing 'alien' hardware inside the machine. You could even dedicate a small microcontroller experimenter board like a Pi Pico or a small Arduino to the job although it would be using the heaviest of sledgehammers to crack the smallest of nuts.

However you did it the 'thing' would have one input (from the reset switch) and two outputs, one going to the reset line and the other going to the DIAG line.

I invite suggestions for a circuit for a non-microprocessor solution to this problem. If it can be done via a simple passive circuit as originally suggested, so much the better, with the caveat that it should not take the PET into the monitor on initial power-on.
SiriusHardware is online now   Reply With Quote
Old 18th Oct 2023, 8:12 pm   #37
Qbertni
Triode
 
Join Date: May 2023
Location: Salisbury, Wiltshire, UK.
Posts: 32
Default Re: Commodore PET 4032 apparent 6520 failure

The reset device Collin is referring to was the Pronto-PET, it was a little box with a push button and four wires that connected up to the pet.
There was a thread over on the vcf forum where they tried to come up with a circuit made from a switch with just some additional resistors and capacitors ( https://forum.vcfed.org/index.php?th...-down.1243260/ )

The following is from page 17 of http://archive.6502.org/publications...ut_1980_12.pdf

But what, you may well ask, is Pronto-Pet? And a good
question too. Well my friends, ever since Jim Butterfield
(I think it was) discovered that you could get out of a
"crashed" Basic condition, with whatever program you'd been
typing in still intact, various gizmos have appeared on the
market to work the necessary magic.
The magic is simple enough, but a little fiddly to do for
yourself - you have to short various user-port pins together,
and so forth; the sort of thing that, at best, isn't easy and,
at worst, is downright terrifying. Nightmares of blown ROMs,
and all that sort of thing. Do everything right though, and you
drop out of the "crash" and into the Monitor, from whence
you emerge by typing "X ". Then you simply go on to type
CLR, and lo! you should be able (in the vast majority of
cases) to list the program you'd otherwise have lost.
The available gizmos have done the nasty work for you,
in that they did all the inter-connecting bits when you pres-
sed a button, or flipped a switch. The end result has always
been the same. The snag has been the somewhat cheap and
tawdry appearance of the ones I've seen together with, on
some of them, difficult little connections you had to make
inside PET.
There's none of this with Pronto-Pet. It's a chunky
little block, machined from solid aluminium alloy, anodised
black, with a single push-button, and four leads. You simply
push the latter on to four of the memory expansion pins
(and which ones are unmistakably explained in the friendly
little instruction leaflet), and you're in business. The block
has a really solid "h e ft" to it, though it's only about 2 " by
1" by and it comes with a very thin self-adhesive pad
which fixes it firm ly and unobtrusively to the side of your
PET.
The really good bit is the operation. Press the button
and let it go quickly, and you get a "warm start" reset. Press
it and let it go s-l-o-w-l-y, and you drop into the Monitor.
Sorry - there's an error in that last paragraph; the really
good bit is the price of this little beauty. Would you believe
just £9.50 - including VAT? Get yourself one for Christmas.
They come from Calco Software who are at Lakeside House,
Kingston Hill in Surrey.
Qbertni is offline   Reply With Quote
Old 18th Oct 2023, 8:19 pm   #38
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,380
Default Re: Commodore PET 4032 apparent 6520 failure

The connections sound like +5V power, 0V, and outputs to RESET and DIAG, the connections to the reset switch being integral to the Pronto-Pet in this case. I hadn't considered its possible use as a crash recovery tool, that IMO makes it a bit more worthwhile considering.
SiriusHardware is online now   Reply With Quote
Old 19th Oct 2023, 10:30 pm   #39
ortek_service
Octode
 
ortek_service's Avatar
 
Join Date: May 2018
Location: Northampton, Northamptonshire, UK.
Posts: 1,338
Default Re: Commodore PET 4032 apparent 6520 failure

Well if you're going to have an external switch (I assume there's not an easy way of adding one to the PET, without dangling wires out of a vent-slot etc that's easily-reversible - so no drilling holes in the case!), then it seems it would be much-simpler to just have 2 separate switches for /DIAG and RESET (If that's actually the usual active-low, then shouldn't need +5V connection).

Having to press a single switch slowly, without risking a switch contact-bounce making it seem like a quick-press. Although I presume a 'warm reset' doesn't normally wipe the memory (And memory doesn't lose its contents when 6502 is reset, as either SRAM or CRTC-refreshed DRAM is used - as 6502 doesn't provide its own refresh).

£9.50 was quite a lot back then (and maybe even now) for a fairly-simple circuit. But I guess a solid custom-machined metal block was the most-expensive part of it.
ortek_service is offline   Reply With Quote
Old 19th Oct 2023, 10:46 pm   #40
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,380
Default Re: Commodore PET 4032 apparent 6520 failure

Any scheme that I would seriously consider using for this would include a switch debounce circuit or subroutine. I'm not sure that a plain ordinary CPU reset doesn't initialise the RAM, I would have thought it would. Maybe Colin can tell us. The most electronically elegant way to add a reset switch (only) to a PET is to wire it across the timing capacitor for the power-on-reset circuit since that gives a clean hardware-timed reset pulse to the main system reset line.

Unfortunately there is no provision on the PCB for such a switch, as far as I know, so you'd have to have a pair of wires soldered to the leads of the reset timing capacitor, probably C68 in this machine.

It is possible to get to the reset line on the memory expansion connector and connect a switch from there to ground - I think Colin already did that on his 3016 - but any reset switch so connected is not debounced as it would be if connected to the power-on-reset circuit. As far as mounting the switch is concerned don't forget Colin is a 3D printing wizard so he can easily make a blanking plate for any available gap in the casing and mount a reset switch on that.

Presumably invoking the DIAG monitor during initialisation diverts the CPU away from the RAM initialisation routines and so stops the machine from clearing the RAM.
SiriusHardware is online now   Reply With Quote
Reply

Thread Tools



All times are GMT +1. The time now is 7:35 pm.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.