6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Wed Apr 24, 2024 8:42 pm

All times are UTC




Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Wed Aug 22, 2018 4:52 pm 
Offline

Joined: Mon Aug 20, 2018 4:04 pm
Posts: 7
Hi to all members, I'm Sergio, from Spain.
I'm a "most-than-a-newbie" in the 6502's world... in fact, I'm an analog technician, so I don't use to deal with microcontrollers.

I've been trying to repair for years a very strange device manufactured by Simmons, a SDS6 percussion sequencer which uses a SY6502 microcontroller. They built about 100 units of it, and there are very few tech info in the web, just hand-drawn schematics.
I'm suspecting about a problem in the microcontroller, since there are no presence of constant digital activity in their busses.

I need to ask very basic questions (please, don't laugh on me) :)

Is the R65C02 a direct replacement of it?

In the CPU board there are two EPROM chips (2732) connected to the SY6502 via its Address and Data busses. I understand those EPROMs has the routine for the SY6502. Besides that, would there be some factory program inside the original SY6502 i need to burn in the R65C02?

The crystal clock circuit has a very rare configuration, with one of the crystal legs connected to ground. I never seen such crystal connection in any other microcontroller environment. Have you understand is a coherent crystal circuit? (I've attached that part of the circuitry)

Sorry about my basic questions. Any tip will be very welcome.

Thanks in advance


Attachments:
SY6502 crystal.jpg
SY6502 crystal.jpg [ 30.88 KiB | Viewed 5107 times ]
Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 22, 2018 5:01 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
Welcome! An interesting project. The first generation of 6502 products used NMOS process, and that's what you have in the SY6502. The next generation used CMOS process, and run cooler, but are slightly different both electrically and to the software - that's what the R65C02 is, and same for anything with a C in the middle. So, most likely this will not be a good direct replacement, not without some adjustments to your circuit.

I think your best bet is to try to find an original NMOS part - they certainly exist. Possibly someone here would be happy to sell one. It doesn't have to be an SY6502 - there were two or three manufacturers, and probably any of their parts will be fine.

And indeed no, there is no on-chip software of any kind, so you don't need to worry about that.

Hope this helps!


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 22, 2018 5:54 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8142
Location: Midwestern USA
Welcome to our 6502 world.

As Ed noted, differences in logic levels between NMOS and CMOS devices would likely prevent a direct replacement of the SY6502 with the R65C02 from working. However, it may be possible to utilize the currently-produced W65C02S, as it will respond to TTL levels on its inputs. There are a couple of pins on the W65C02S that have different functions than on the 6502, but that is easily handled.

However, I think the first thing to be done is to conclusively determine if the SY6502 has failed. Outright failure of these devices is quite rare—I have worked with this stuff since the late 1970s and have yet to see a microprocessor actually fail. It could be the clock generator circuit is no longer functioning, which is where I would start investigating.

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


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 22, 2018 6:01 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
Ahem, yes, very good point BDD, we don't yet know what's broken. A good clock signal is essential, and is the first thing to check. After that, you might check the R/W and SYNC pins of the CPU. Measuring frequency will be enough for those. For the clock, the frequency of the signal at pin 37 tells you if the oscillator is working, at 39 gives a hint as to whether the CPU accepts the clock. An oscilloscope would be handy but might not be essential. Pin 10 of IC4 might be interesting too.


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 22, 2018 7:25 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8427
Location: Southern California
Welcome, Sergio.

One of my first suspicions would be the crystal. A tech I hired in the mid-1980's had fixed a few game machines where the kid, in his excitement over some kind of game victory, slapped the side of the computer and damaged the crystal. Replacing it made everything work again.

The "SY" in the "SY6502" just means it was made by Synertek. R6502 (without the C) is the same thing made by Rockwell. There were other manufacturers as well. I'd give a CMOS one a good chance of working in the same circuit; but no guarantees. The 6502 is a microprocessor, not a microcontroller, and as such, does not have onboard memory, I/O, or other support like a microcontroller does. The program is in the outboard memory.

_________________
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: Wed Aug 22, 2018 7:53 pm 
Offline
User avatar

Joined: Wed Mar 01, 2017 8:54 pm
Posts: 660
Location: North-Germany
That crystal oscillator circuit uses the parallel resonance mode. If the crystal would be placed parallel to R27 (but with a different resistor value) then this is the far more common series resonance mode.

I second Garth - if there is no stable signal at IC4p10 then try a new crystal. They sometimes cease to work. If this still doesn't help, try a "new" CPU.


Last edited by GaBuZoMeu on Wed Aug 22, 2018 9:57 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 22, 2018 9:46 pm 
Offline

Joined: Mon Aug 20, 2018 4:04 pm
Posts: 7
First, I want to thanks for your answers, I really appreciate that.

I have a R65C02P2 and a R6502AP new ones. The reason why I'm using the CMOS one is because it is the only one that shows a behavior compatible with the "RESET" function during power up. The control panel has a large number of LEDs, and when I use the 65C02 the LEDs pattern changes in less than a second after the power up, coincident with the RESET time, as recognizing it.
The SY6502 and the R6502AP don't shows any change coincident with the RESET on power up, as if they didn't recognizing it.
I know is a very superficial observation, but it is my reference. If you suggest I use the R6502AP one, I will do it.

The 1Mhz clock is present in both pins (37 & 39) but in the 37 one it is very weak. I need to set my oscilloscope test probe in "x10" to measure it (maybe reaches 3.3volts). So, I don`t know if the clock generator is fully reliable or not.

I will perform the measurements you are suggesting me... basing in the RC6502AP.

And sorry, "microprocessor" instead "microcontroller" :)

A lot of thanks !


Top
 Profile  
Reply with quote  
PostPosted: Wed Aug 22, 2018 9:56 pm 
Offline
User avatar

Joined: Wed Mar 01, 2017 8:54 pm
Posts: 660
Location: North-Germany
The "weak" signal on p37 is OK (BTW use always 10:1 mode, although 1 MHz isn't really much the probes capacitance might destroy the signals integrity too much). Important is a stable 1 MHz clock nearly 50% on and off at p39. If that works with NMOS and CMOS CPUs that should be fine.

Your observation according to the RESET behaviour isn't superficial! Perhaps you can post that part of the schematic as well?

For now I would continue to explore the machine using the R65C02.


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 23, 2018 10:26 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1392
Welcome to the forum, Sergio.

I never have seen a defective NMOS 6502 or 65C02.
If TTL chips like 7404 were defective, in most cases they had arrived dead fresh from the factory.

Would be interesting to see a bigger part of the schematics,
and a picture of the "computer" and its power supply.

Electrolytic capacitors have a habit to dry out over time,
please check with your 'scope if there is something like a 50Hz AC ripple on the +5V (if you haven't done this already).

Another possible source of problems could be cheap and maybe corroded IC sockets.


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 23, 2018 10:46 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
If the CMOS chips seem to work a little better, it could be because the input circuits (especially the clock input) will be different - perhaps, more sensitive.

If you're willing and able to make modifications, then disconnecting pin 37 from the circuit and injecting a nice clean 5V 1MHz clock might be worth doing. (That's 0V to 5V, not 5V peak-to-peak! Edit: I mean, a digital signal, not one which swings both sides of zero.)

If it does turn out that the crystal + R + C + inverter is failing to make a good clock, and otherwise all is well, then patching in a crystal can oscillator might be a good move - again, if you're happy to make changes.

Maybe
1 MHz 4.5 V HCMOS, TTL Standard Clock Oscillators


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 23, 2018 10:39 pm 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 851
Welcome!
ttlworks wrote:
Electrolytic capacitors have a habit to dry out over time,

Definitely!
When I bought a used Commodore 64 back in 1988, it had a weird color bar scrolling up the screen. Replacing the power supply filter capacitor for the video chip eliminated the color bar.


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 24, 2018 6:25 pm 
Offline

Joined: Mon Aug 20, 2018 4:04 pm
Posts: 7
Hi Friends !

I've attached the full CPU board scheme (fig.1). It was re-drawn by me, because the original one looked like a caveman painting.
In addition, I drawn the most exactly representations of digital waveforms presents in all I/Os of the R6502AP I'm using now. There are few address busses with no activity at all. BTW, the data busses pulses goes from 0 to 4v, and the address ones 0-5v.
All those pulses are absolute static, I mean, there are no dynamic activity (like data flowing) in any bus.

If I use the CMOS version, R65C02, or the original SY6502, there are no activity at all in address and data busses (except for 1Mhz in pin 39).

Years ago I've changed the sockets by mechanized-holes ones, the electrolytic caps and all TTL chips are news (and socketed, too). I've been suffering too much time with this machine, so I had time to make all this replacements.

The 5v rail is stable: 5.03v and no 50Hz ripley, just a very little noise of 1Mhz (10mV at most)

Do you think I would need to try with a most reliable crystal clock circuit, as it shown in the SY6502 datasheet (fig.2)

Thanks for your time !


Attachments:
clock.gif
clock.gif [ 15.3 KiB | Viewed 4890 times ]
01 CPU Board scheme (redrawn).gif
01 CPU Board scheme (redrawn).gif [ 249.02 KiB | Viewed 4890 times ]
Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 24, 2018 9:36 pm 
Offline
User avatar

Joined: Wed Mar 01, 2017 8:54 pm
Posts: 660
Location: North-Germany
Thank you for posting this schematic - great job! Your measure of the voltages does look very well, these values appears "normal" to me. I don't think that there is something broken.

There are some interesting (or strange) details in that schematic :)

I wonder why they have two reset circuitries - one for the CPU around IC24 and one for the VIA (IC12) using a 555 that can be triggered by a pushbutton? But I assume you have verified that both RESet signals start with "0" and the turn to "1" briefly past power on.

There is an alien signal called "F3". It is connected to the "/NMI" input (p6) of the CPU. It is necessary that this signal is "1" during the start procedure - if possible disconnect it until some more activity is achieved. There is R26 that pulls this line up to 5V. So just disconnect F3 from whatever there is attached.

The 60/40% duty cycle of PHI2 (CPU,p39) is not very well, perhaps you should use a different oscillator (a can osc. or that circuit you suggested) to achieve 50/50% somewhat better.

There is a battery (or accumulator) to pull up the /CS of each RAM. Again I assume you have checked this being working or replaced it already.

Replacing old sockets and electrolytic caps you have done already - good.

Have you a tool to read out the contents of the EPROMs ? IC21 should deliver at least the first two bytes (the so called RESET VECTOR) for the CPU, so it knows where the main program is located. The addresses are $FFFC (low part of the program start address) and $FFFD (high part). They are fetched from the EPROM immediately one after another. And then they are used to fetch the first instruction. This address should be somewhere in the range from $E000 up to $FFF8 as that is where the EPROMs are placed. Perhaps you can figure out what is going on during these first 10.. clocks after CPU /RES is "1".


Regards
Arne


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 25, 2018 3:35 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3346
Location: Ontario, Canada
Hello, Sergio, and welcome :)
Attachment:
scheme exerpt.png
scheme exerpt.png [ 18.24 KiB | Viewed 4849 times ]
Great job on the schematic! I'm particularly interested in the waveforms you included here. I can't be certain but I believe these waveforms may be normal.

It is common for a program to execute a loop when it is waiting for something, such as a certain condition detected in one of the devices attached to the CPU. The CPU is always fetching instructions, and in this case I suspect the instructions cause it to read from an attached device then examine the result. If the result indicates more waiting is necessary then the program loops backwards and repeats itself. This explains why A3 ... A8 have no activity. It's just the same few instructions that get fetched again and again, plus a read from the attached device.

Here is a slightly different theory. It's possible the attached device is supposed to trigger an interrupt, and the associated program -- the Interrupt Service Routine -- is supposed to leave a message of some kind in Random Access Memory. But until that happens the main program will keep examining memory, waiting for the message to appear. I know it may sound strange, but the CPU sends a message to itself -- that's quite common. So, you'll see the same few instructions that get fetched again and again, plus a read from RAM.

Anyway, I suspect that certain basic functions are OK, such as the oscillator, the CPU and the power supply. I think the fault may be associated with one of the attached devices such as the 6522 VIA. For example:
  • the device may not be getting a chip-select signal from the memory decoder
  • the device may be getting a chip-select but failing to respond (ie, it is defective)
  • the device itself may be waiting for a signal from some other device

What sort of waveform is present on the chip-select input of the VIA? If it seems to pulse low once during every sequence on A2 ... A0 then that confirms the program is polling the VIA.

Are you familiar with how the SDS6 percussion sequencer should respond when it's functioning properly? Can you speculate what the program may be waiting for? If you imagine what is supposed to happen then maybe that will be a clue.

-- 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: Sat Aug 25, 2018 3:56 am 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
As best I can work out from the data lines, the CPU is not repeatedly resetting or interrupting (SYNC every 3 cycles is too often for that), but is being told to execute LDA $81 repeatedly. LDA zp is the only opcode formed by the observed signal sequence that takes 3 cycles to execute; the others are SED (1 byte, 2 cycles), STA izx (2 bytes, 6 cycles), the illegal $FF which should apparently take 7 cycles, and BRK which forces an interrupt and takes 7 cycles. If R/W was monitored, I could be more sure.

However, the A7 line never goes high, and it should while executing LDA $81. Moreover, the low-order address lines are not cycling in a sensible sequence for consecutive 2-byte instruction fetches every 3 cycles. So *something* weird is happening here.

I wouldn't worry too much about the 60/40 duty cycle on the clock; it's only 1MHz, and probably did that from new given the simplistic design of the oscillator. At higher speeds you'd probably want something cleaner, sure, but 60/40 was probably considered good enough back then.

You could try wiring up the CPU to execute NOPs (opcode $EA) outside of the faulty machine, as a way to verify that it really works.


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

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: