6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri May 31, 2024 2:47 pm

All times are UTC




Post new topic Reply to topic  [ 72 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Sun May 24, 2020 4:56 am 
Offline

Joined: Tue May 19, 2020 7:39 pm
Posts: 31
Location: Basel-Stadt, Switzerland
jds wrote:

So while everyone is busy debating the pronounciation of phi, the big new is that it looks like /IRQ is asserted, which is definitely a problem.


What does that mean?

thanks,
Emmanuel


Top
 Profile  
Reply with quote  
PostPosted: Sun May 24, 2020 5:20 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8445
Location: Southern California
Commodore_PET wrote:
jds wrote:
it looks like /IRQ is asserted, which is definitely a problem.

What does that mean?

It means the interrupt-request line is always low (ie, true), so if the main program set up interrupt sources and cleared the interrupt-disable flag, the interrupt-service routine (ISR) is hogging all the processor time, even if no IC is claiming responsibility for it. As soon as it's done, it is re-entered immediately, so the main program doesn't get a chance to get anything done. If you're unfamiliar with interrupts, see my 6502 interrupts primer.

_________________
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: Sun May 24, 2020 6:17 am 
Offline

Joined: Tue May 19, 2020 7:39 pm
Posts: 31
Location: Basel-Stadt, Switzerland
Ok so ive read up until and including paragraph 1.3 of the link you posted (although 1.3 GETTING TO THE NUTS AND BOLTS) was starting to go above my understanding. I think i understand what is happening. I wonder if this interrupt can clear the screen? If i power cycle the machine within like 3-5 seconds (ON->OFF->ON), i see a screen filled with characters and they all look fine, before the screen clears.

I guess now we need that logic probe?

Emmanuel


Top
 Profile  
Reply with quote  
PostPosted: Sun May 24, 2020 6:40 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10810
Location: England
Is this the right circuit diagram for this PET?
http://www.zimmers.net/anonftp/pub/cbm/ ... 320349.pdf

There are many documents nearby:
http://www.zimmers.net/anonftp/pub/cbm/ ... index.html

The IRQ input to the CPU seems to be driven by the 6520 and 6522s, so a defect in any of those, or a short on the line, or a failure of the pullup, would all be possible causes. Or, it's possible the machine hasn't managed to run enough code to initialise the peripherals.

But these are possibilities to consider, not a debugging algorithm...


Top
 Profile  
Reply with quote  
PostPosted: Sun May 24, 2020 6:57 am 
Offline

Joined: Tue May 19, 2020 7:39 pm
Posts: 31
Location: Basel-Stadt, Switzerland
These do seem the me to be the right schematics, at least one other schematic from that directory i know for sure shows the board that i have.
Its the image that i posted that includes the detailed drawings for the DIP shunts, none of which correspond to the configuration that is present on my board.

What course of action or order of steps would you suggest me doing now?

So a MOS 6522 I found relatively cheap but a MOS 6520 is harder to find. I havent ordered it yet though.

Googling some more for "MOS 6520" i came across this: https://www.westerndesigncenter.com/wdc ... ements.cfm

where it states "The W65C21S can replace older and obsolete NMOS and CMOS versions of the 6520/6521/6820/6821 Peripheral Interface Adapter (PIA) supplied by WDC's licensees and others."

Do I read this right? this can replace a MOS 6520? Or are these completely different devices? I just saw 6520 and PIA but thats probably too simple.


Emmanuel


Top
 Profile  
Reply with quote  
PostPosted: Sun May 24, 2020 8:47 am 
Offline
User avatar

Joined: Thu May 14, 2015 9:20 pm
Posts: 155
Location: UK
I would say that further investigation is needed before thinking about ordering replacement chips.

With the power to the machine off, using your multimeter on the resistance range, test resistor R17. The schematic shows the value as 3.3kΩ. Test across its leads.

If this is okay, test between pin 4 and pin 1 of the 6502 again on the resistance range. Report back your findings.

With the power to the machine on, with your multimeter switched to a voltage range, confirm the voltage between each lead of resistor R17 and a 0V/GND point (e.g. pin 1 of the 6502). One lead should be at +5V. The other should read the same voltage as pin 4 on the 6502.

If things don’t make sense, it may be that the schematic that I am using is not the correct one.

Oh, and the information that the screen clears from garbage to a clear screen is a good sign. It means the 6502 is at least managing to execute some of the ROM code.

Mark


Top
 Profile  
Reply with quote  
PostPosted: Sun May 24, 2020 10:03 am 
Offline

Joined: Tue May 19, 2020 7:39 pm
Posts: 31
Location: Basel-Stadt, Switzerland
Ive found R17, its right bellow R50, right?
With the machine off it reads 3.25kΩ

connecting Pin 1 and Pin 4 on the 6502 I measure 3.47kΩ

Turning the machine on, one side of the resistor does measure 5.13 Volts, while the other side measures 0.12 Volts, the same as Pin 4 of the 6502 Chip.

Emmanuel


Top
 Profile  
Reply with quote  
PostPosted: Sun May 24, 2020 10:24 am 
Offline
User avatar

Joined: Thu May 14, 2015 9:20 pm
Posts: 155
Location: UK
So those results indicate to me that R17 is okay and that there is no ‘simple’ short circuit. Rather, one of the 652x interface chips (where 652x means 6520/6521/6522 etc) is actively pulling the /IRQ line low. Normally/IRQ should be logic high, it should only go active (low) when a device is signalling that it needs the attention of the microprocessor.

This could be a symptom of a software crash (possibly due to a faulty ROM or a faulty DRAM chip) or due to a fault with one of the 652x interface chips.

The recommended tools that are needed now are a PET Diagnostics module or PET Test ROM and a logic probe. The PET Diagnostics is shown here. The PET Test ROM is useful if the 6502 is good, this blog post shows how it can be used for fault finding.

Alternatively the zero cost option would be to remove each 652x interface chip one by one until this clears the /IRQ line symptom. Then see how far the system gets.

Mark


Top
 Profile  
Reply with quote  
PostPosted: Sun May 24, 2020 10:42 am 
Offline

Joined: Tue May 19, 2020 7:39 pm
Posts: 31
Location: Basel-Stadt, Switzerland
I will look into the PET test ROM, and yeah, the logic probe is ordered.

So if IRQ (Pin 4) is low with 0.12V, what voltage would i expect when its high? the 5V?
in the mean time, how do i test this with removing the 652X?

Remove the first one, start the machine, measure IRQ to Ground. Then turn off put it back in and take the next out? or leave it out and take the next one out?

Emmanuel


Top
 Profile  
Reply with quote  
PostPosted: Sun May 24, 2020 11:23 am 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
I would actually start by removing all of the 652x chips (remembering which went where). If this doesn't clear the /IRQ fault, then you know you have a short-circuit to track down. You're looking for an /IRQ voltage somewhere above the TTL Vih threshold of about +2.4V, but preferably closer to +5V, probably similar to what you measure on /NMI.

If removing all the 652x's clears the fault, put them back in one at a time, powering down to do so of course. The one which causes the fault to re-appear is the suspect to focus on. But don't instantly assume you need a replacement chip, even then; the whole principle of computing is GIGO, even at the individual chip level, and there are several signals a VIA or PIA relies on for proper function.

In particular, I would monitor /RESET on the suspect chip during power-up. There should be an observable delay between +5V and /RESET going high. Make sure Phi2 is toggling at the suspect chip's input, too, using the AC voltage setting.

Should you need a replacement, the W65C22N and W65C21N should be valid replacements. The N suffix is important, as that denotes electrical compatibility with the original NMOS designs. The 6820 and 6521 are indeed pin-compatible, just with minor changes in electrical characteristics that the PET shouldn't care about.


Top
 Profile  
Reply with quote  
PostPosted: Sun May 24, 2020 12:09 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10810
Location: England
BTW if you're not already experienced in removing DIP chips: take care to ease them out keeping them parallel to the board. It's quite easy to have one end come out first, which bends the pins, and if those pins break you're in difficulty. (It's also important to pull the DIP chip, and not accidentally put a lot of force on the socket.)


Top
 Profile  
Reply with quote  
PostPosted: Sun May 24, 2020 2:16 pm 
Offline

Joined: Tue May 19, 2020 7:39 pm
Posts: 31
Location: Basel-Stadt, Switzerland
So Ive been able to test the 652X chips as following:

All out, i get 5.04V on the IRQ of the 6502
First one in (6520) i get the low 0.12V
I take it out again, put the second one in (6520) after which i get 5.12 V on IRQ of 6502
I put the third one in (6522) and i get the 5.12V again on IRQ of 6502

I also now get a single character on screen again! yey!

since i assume that both 6520 chips are identical, could i swap them to see if the error occurs again, is there a chance that i could break the working one?


Chromatix wrote:
In particular, I would monitor /RESET on the suspect chip during power-up. There should be an observable delay between +5V and /RESET going high. Make sure Phi2 is toggling at the suspect chip's input, too, using the AC voltage setting.


There is a noticeable difference between 5V and RESET. About a solid second on reset while it almost instant on 5V when i turn the machine on. I dont know if ive done the checking Phi2 right, but setting my multimeter to what i think is AC and a range of 200, it reads 4.2V and is constant.

Emmanuel


Top
 Profile  
Reply with quote  
PostPosted: Sun May 24, 2020 2:27 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3361
Location: Ontario, Canada
BigEd wrote:
take care to ease them out
Take care when it's time to replace them, too! I'm stating the obvious, perhaps, but folks do sometimes get tripped up. All the pins need to engage the socket, with none curled up underneath (for example).

Commodore_PET wrote:
since i assume that both 6520 chips are identical, could i swap them to see if the error occurs again, is there a chance that i could break the working one?
IMO the risk of that is very small. I would swap the chips and see what that reveals. Good luck! :)

-- 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: Sun May 24, 2020 2:44 pm 
Offline

Joined: Tue May 19, 2020 7:39 pm
Posts: 31
Location: Basel-Stadt, Switzerland
Dr Jefyll wrote:
IMO the risk of that is very small. I would swap the chips and see what that reveals. Good luck! :)

-- Jeff


So i have put the second 6520 in the first slot and it resulted in the same 0.12 V in IRQ of the 6502 as the first 6520 did. I put it back into its original position, leaving the first slot empty and i get 5.12V on IRQ of 6502 again.

At the same time, taking the first 6520 and and put it in the second slot also results in the 5.13V on IRQ of the 6502.

Does that mean its not necessarily the chip itself? but something with the socket or connections to the socket of the first 6520?

Emmanuel


Top
 Profile  
Reply with quote  
PostPosted: Sun May 24, 2020 3:13 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
The chips are fine, and there is probably a fault somewhere on the board which disrupts the signals it sees. That's what I was trying to explain above, and why you need to examine the input signals at the suspect chip, not "equivalent" signals elsewhere on the board. If the socket is not properly connected to these "equivalent" signals, the behaviour will still be wrong even if the latter are correct.

You can run these tests with the suspect chip removed, and just check the signals in the socket:

1: Check the /RESET signal (low for a short time after power on, then high).

2: Check for a Phi2 clock (oscillating continuously).

3: R/W signal should read high with the computer idle.

4: At least one of: CS0 low, CS1 low, /CS2 high should be true, with the computer idle. That ensures the chip is deselected from the bus. However these signals may fluctuate rapidly such that the correct conditions on any single line are not stable, but the required condition always holds in total.

Is the suspect socket C6 or C7? If it is C6, then it controls only the IEEE-488 port and it may be possible to use the machine without it fitted. But if it is C7, it is responsible for the keyboard and will require further troubleshooting.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 72 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC


Who is online

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