6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon Sep 23, 2024 6:22 pm

All times are UTC




Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sat Mar 30, 2013 1:58 am 
Offline

Joined: Sat Mar 30, 2013 1:06 am
Posts: 13
Hi people, I joined these forums only to seek help, I am no good at all in programming anything but relays! really, but despite this I have made projects using Static RAMs like 6116 and store data and retrieve data without a processor, using standard CMOS chips like 4558 to address memory locations and so on and storing data in the memory I/O . The product i designed back in 1986 started off with a 2114 Ram, but due to technology pace was so fast, that it soon became obsolete, I then had no choice but to use a larger memory like the 6116, a 16K memory with 8 I/O ports or channels.

Glad to say the product is still in production, after all those years, though not selling like a hot cake! It is all hard wired logic, using things like 4511 for 7 segment decoders, keyboard, a card reader, and a key switch to allow user to validate or invalidate cards, any data belonging to the cards is stored in the memory, so it does not need to run with a processor, as my weakness was Software! or the ability to learn programming languages to program Micro-controllers.

Apart from that, I learned a bit of GWBasic, and I am still able to program some programs using this tedious but best ever program for me and have done a few programs for analysis, like I wrote a program that would print on sheets of paper full perms of 6 numbers for a lottery from any given pool of numbers, for example if you wanted to play a lottery, you have 6 numbers to choose from 49, and any 3 number match results in a £10 win, any 4 matched numbers can result in on average around £40 win, and 5 gives you more and so on,

However, I noticed that very often I got 2 out of my best 6 numbers, so all i needed was 1 more to win £10, so I thought if I play with 7 numbers, one extra, then that would increase my chances but obviously at the expense of more tickets, so for a 1 extra number I would need to play for £7.00 as each ticket of 6 numbers cost £1.00, so that means i need to permutate 7 numbers and without making any errors, I wrote this program that would permutate up to a pool of 20 best numbers, so that when you fill your lotto tickets you do not repeat or miss out any permutations!

I was so please with this program written in basic, then I did more on analysis, I must have written about a dozen different programs to help me select the best numbers and make my chances of winning better than otherwise, even a slight improvement in odds is a welcome thing, and needless to say it did work, but of course I never actually did it in a big way, but when i did it on just my computer and checked results with what i might have done if I had done it for real, I would have lost some weeks and some weeks I would have won a lot!

Any ways guys, mathematicians will argue with anyone, that law of averages means you cannot win no matter what, but can i argue with them, may be not, but here is what I observed, if you study the past 50 lottery results, you see a pattern, some numbers appears to come more than others, so why not choose about 20 such numbers that appear more than often, or with a higher than average occurrence!

So I devised a program that would select random numbers only from a pool of these highly occurring 20 numbers, you could increase the pool size to any number between 7 and 32, but not all 49, so if you ran this program you would need to enter the 20 best number from your keyboard and then type run! and the program will then select 6 sets of numbers and print them, when you got about 50 or 100 sets of numbers, go to a lotto dealer, and pay him £50 or £100, and hope for the best, of course you had to fill the tickets and I won quite a few times a lot of 4 number wins, and so far no 5 number win, but lots and lots of ten pounds win, overall I lost money, however, whilst I was there doing it, I also stood the same chance of winning a jackpot!

Any ways, I am into tagging systems, and have designed products that sense tags and also deactivate tags, that is my living, and at one time I was doing so well that I did not have a rival or a competition, but now there are quite a few players in this game, pleased to say that I am selling some of my products to China!

but hey I know absolutely nothing of programming microcomputers, controllers, or even a simple pic chip! I get totally lost and I hate products that have micro-controllers where ordinary CMOS chips could function equally well, in fact better than any micro-controlled products, because they will never crash, never have a hick-up, never freeze, and every time you switch on they are at your command instantly! no loading or waiting time, I am sorry if I say that, but currently I have a problem with my Marants PM453 Power Amplifier, about 20 years old and it has stopped working because all its input select and volume control, functions were carried out by an LC6502C and 42 pin Chip that has stopped functioning! I cannot listen to my music any more! i loved that Amp, but i can't get any help from Mrantz!


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 30, 2013 2:25 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8513
Location: Southern California
Welcome!

Quote:
I get totally lost and I hate products that have micro-controllers where ordinary CMOS chips could function equally well, in fact better than any micro-controlled products, because they will never crash, never have a hick-up, never freeze, and every time you switch on they are at your command instantly! no loading or waiting time

Microcontrollers usually have a watchdog timer which you only reset in one place in your main loop; so if anything goes out of control and fails to get back to the main loop, the watchdog timer will time out and reset the whole thing to get it back under control, doing its thing without human intervention. You can usually set up the time-out period to be whatever suits the need, from a few milliseconds up to a whole second or so. They also have brow-out detect, which will reset the microcontroller if the power supply dips too low for reliable operation, and release it again when the power meets the requirements. I have designed microcontrollers into many commercial products, and used the watchdog timers, but there has never been any evidence that the watchdog ever had to reset them. Since their program is in ROM, not loaded into RAM each time, they come up instantly too, with no waiting.

That's not to say that microcontrollers are right for everything though. I have some considerations on the first page of the 6502 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: Sat Mar 30, 2013 2:58 am 
Offline

Joined: Sat Mar 30, 2013 1:06 am
Posts: 13
Thank you Garth, for your reply, I wish they did that to most laptops, when they seem to just freeze and you can't do anything unless you force shut it, and then it will need reboot and check disk! (lol)

any way this is what I am looking at, it bis a Marantz stereo Amp, and when I opened to examine it, I was quite disappointing when i saw it has a processor driven system, these cannot be repaired easily unless you could replace faulty chips and download firmware, again not an easy task on some products, there are no ports on the rear of this amp where you could connect its embedded micro-controller and re-program it,

Mrantz must have got these chips programmed by the chip manufacturer, before soldering them onto the mother board.

I actually ordered a 42 pin Chip available on Ebay from USA, the guy said it should work as any firmware must still be stored in its internal ROM, the chip cost me $15.00 and the guy wanted another $38 for shipping just a small chip via UPS! I asked him to ship it using just an Air Mial and it should get to me ina few days, but he refused, so I used a friend in USA to order that for me and he posted it to me, only cost $9.45, but sadly this chip had the word Akai, so i guessed that its firmware would not be compatible, as micro-controller, it is in the instructions that you set inputs and outputs, so it was a futile attempt, and needless to say when i tried it, it failed to work, I really wsn't expecting it to TBh, but now that the chip was here in UK, I have no choice but to try it out!

Oh i forgot to tell you, when i unpacked the chip, i noticed that the guy from USA sent me an Akai LC6505C chip, though his picture and description stated it was an LC6502C, so he would be giving my friend a refund in USA!

and it is on a 0.1" pin spacing, so not only is it nearly 3/4" longer than the one used on my Amp, so i checked on the net if 6505 is similar to 6502, so it appears it is except that 6505 has lower built in memory capacity bot in the ROM and RAM!

Mrantz do not support this 20 year old product! The amplifier model is PM453, built for UK market. I have done the basic checks like 5V power being available at the VCC pins and that the clock is arriving at its clock input pin. but it is frozen solid! with some ports on 1 and others on 0, so just glows randomly.

when I touch some pins with my fingers, i.e. i am passing some minute current through the skin resistance of my fingers, then various Status LED's starts to move and then freeze in new positions along the bar graph which indicates the volume level, all the while the inputs from the amplifier are not switched on, i.e other chips that control the volume and input functions of the amp are not switched on.

further reading ;

Ok, talking about this LC6502C which is used for controlling Volume control chip - a TC9177P, and Input selet analouge switch TC9163N, both of these chips require a clock, data, and strobe signals from the 6502 processor, and also an MSM59371 IRS or M59371 OKO chip, this none does the LED bargraph showing where the volume level is at, and other LEDs

it appears that my chip has died, or lost its instructions, or firmware, there are no other RROM anywhere on the circuit diagram, so any program must be stored within the chip I believe, but I could be totally wrong, so why I need your help, is there anything i can do to rescue this brilliant 60Watts RMS per channel class A + B amplifier.

I have a full schematic diagram of the Marantz amplifier as it came with the unit, and I can take a camera picture of the section where this controller is shown with associated supporting devices, infact I don't think it has any external supporting devices accept for the clock signal which is generated using a cmos 4011 nand IC and a 400Khz resonator/crystal. The clock signal on this extended pin chip (it has 42 pins as opposed to 40 pins found on most 6502) goes to pin 22, pin 20 and 21 being ground and pin 23 not in use, and supply at pin 42 and pin 39.

Question is can anybody help me with reprogramming it? can a program be written from looking at the schematic diagram where it shows you how the various buttons interact with the controller, in a 4 x 4 matrix, which also uses blocking diodes, these switches select tape, Tv, loudness, VCR, and so on all those functions you get on an amp!

Failing this I will have to pull out this controller and other chips that it drives and install basic knob type volume control instead of push button type currently on the unit, I have noticed new latest models from Marantz do not feature this and has a large dial for volume control! and push button or toggle switches to select inputs and get my amp going with a crude new front panel, it won't be possible to retain its originality, except it will sound just as good.

one final question....is this 6502 chip still in production and widely used in embedded applications?


thanks in advance


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 30, 2013 7:12 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8513
Location: Southern California
I'm starting to think this LC6502 and LC6505 are Marantz part numbers and not 6502-related processors. The 6502, if you get it in a DIP package, always has 40 pins on .100" centers, and the 6505 only has 28 pins, omitting 4 address pins, NMI\, phase-1 out, sync, 3 N/C's, SO\, and one of the Vss pins. Neither one has any onboard RAM or ROM or I/O. They're just bare processors.

I worked at TEAC in the early 1980's and a lot of the then-modern tape recorders had microcontrollers. The X7R, X10R and maybe something else in that family had a bug in the firmware that was extra frustrating because we in repair really couldn't do anything about it. My theory is that the tape counter would produce interrupts, and that as it reached a certain speed in FF or REW, the processor couldn't handle them as fast as they came anymore, and it crashed, with no watchdog to correct the problem. Motors then would go totally out of control and the machine seemed like it would take off and fly away or explode or something. It was impressive. One customer who called said, "Earlier I bought an 3440, and I believed your slogan, 'First, because they last.' Now that I have an X10R, I think you ought to change it to 'Last, because they don't.'" :lol: The cassette machines with microcontrollers never had any microcontroller problems. Possibly the most troublesome machine however was the 5500 open-reel machine which was a little before the microcontrollers and had a ton of discrete logic. The problem was not the logic itself but intermittencies resulting from cheap construction.

Quote:
one final question....is this 6502 chip still in production and widely used in embedded applications?

It (actually the 65c02, which has a lot of enhancements over the original 6502) is in production today in absolutely huge volumes--hundreds of millions of units per year--but they're mostly invisible, being at the heart of custom ICs, in appliances and consumer electronics, under cars' hoods, and even in life-support equipment. Then there are off-the-shelf ones available that are conservatively rated for never less than 14MHz that can be bought in small quantities by hobbyists and small industries. The main business of the IP holder, Western Design Center, is licencing IP, not selling hardware. We try to keep the topic, 65xx parts sources, updated with the places you can buy them.

_________________
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: Sat Mar 30, 2013 10:25 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
Hi Mike, welcome. I agree with Garth - it looks like the LC6502C is a Sanyo 4-bit microcontroller. They'd make a different version for each customer, most likely. Notice how the RAM is described as 128x4 bits.

I think you're going to need an exact replacement, unless the problem is a flaky clock or reset line.

Your RAM-based sequencing designs sound interesting though!

Cheers
Ed


Attachments:
File comment: Sanyo LC6502C 4-bit microcontroller in a product table
sanyo-lc6502c-microcontroller.png
sanyo-lc6502c-microcontroller.png [ 376.89 KiB | Viewed 2247 times ]
Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 30, 2013 1:22 pm 
Offline

Joined: Sat Mar 30, 2013 1:06 am
Posts: 13
Thank you Both Garth and Big Ed, for your time in looking at this, indeed i can confirm that both chips (my one) and the one I got from Ebay, are 42 pins, but the seller showed a picture of LC6502C and on arrival it was LC6505C!

My best option would be to bypass all analog processor controlled chips, via mechanical bank of interlocking switches to select input and then fit a conventional volume control, hopefully none of these chips were used for sound processing and that my pre-amplification signals are already suitable for passing through the manual controls, The bass and Treble were not processor controlled! they had slider buttons, I would do this as a hobby, though i could spend a little and get a proper new amplifier!

So guys, do you write programmes for a living or as a hobby? what if I needed your help in writing a software for an embedded application, as I need to upgrade my machine using a micro-processor, with an LCD screen and a card reader. The processor needs to be one that can be available for the next 10 years at least!


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 30, 2013 1:40 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
Hi Mike
Interesting project, to de-automate your amplifier!

I'm very much a hobbyist, although I do write scripts at work. I probably wouldn't be much use with your embedded application. But if you base your design on a 65C02 or 65816 I'm sure you'll get a lot of help on this forum.

I couldn't guess whether the micro will still be available as a new part in 10 years, but it's been around since 1975 in various forms. You can be sure there will still be enthusiasts and new-old-stock parts for a long time to come. (The 'C02 and '816 are both available today as new parts: http://uk.mouser.com/Search/Refine.aspx?Keyword=65c02 and http://uk.mouser.com/Search/Refine.aspx ... d=W65C816S)

Cheers
Ed


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 30, 2013 1:42 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
mikefromlondon wrote:
So guys, do you write programmes for a living or as a hobby?

I do both freelance work for a living (embedded software, hardware, verilog), as well as for a hobby. Some hobby projects have turned out to be the basis of commercial projects.

Microchip has a good reputation for keeping parts for a long time.


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 30, 2013 7:58 pm 
Offline

Joined: Sat Mar 30, 2013 1:06 am
Posts: 13
Thanks guys for showing your interest in doing some freelance work, I may contact you when I am ready, or when the projects get more tangible with the interested parties, I may need to proceed and will then require people like yourselves to write me a software, as I am not a company with unlimited R&D expenditure, so if the product is not taken up then it becomes another white elephant so to speak at my loss.


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 31, 2013 12:22 am 
Offline

Joined: Sat Mar 30, 2013 1:06 am
Posts: 13
Just stumbled across this 6502 reverse engineering on youtube video that may be of some interest to some of you, if not already shown or posted before then by all means move or start another thread on it, if you want.
http://www.youtube.com/watch?v=K5miMbqYB4E


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 31, 2013 4:58 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
Ah yes, Michael Steil's presentation at the 27th Chaos Communication Congress - excellent! We have indeed covered visual6502 in several threads, but no harm in mentioning it again. This was the thread where we discovered the project: viewtopic.php?p=11621 and this is the post where we first mentioned the visual6502 simulator: viewtopic.php?f=2&t=1686

Cheers
Ed


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 03, 2013 3:37 am 
Offline

Joined: Sat Mar 30, 2013 1:06 am
Posts: 13
managed to rescue my Amp, having bypassed all analog gates by switching them ON manually (bridging) and allowing the signal to pass through the various analog filters and Bass & treble which were manual any way, and adding stereo pots to control the volume. Just needs a way of using may be using a motorised pot so that the original press down or press up buttons can be used to control the volume and other features.

just as well, it is almost impossible to get hold of the original firmware for the 6502, and pointless writing a new one, the time it would take someone to do that as it is beyond my total capability to do just that.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 05, 2013 3:22 am 
Offline

Joined: Sat Mar 30, 2013 1:06 am
Posts: 13
I have a bad feelings that the LC6502C used on my Marantz Power Amplifier, is not the same as a generic 40pin chip, as the one used on Mrantz is a shrunk chip, looking at the Mrantz schematic diagram, its VCC pins are shown at pin 1, and GND pins are at pin 20 & 21, as it is a 42 pin chip, as well as its clock is applied to pin 22, and uses a 400khz resonator , so I do not have any other data on it, as the schematic diagram does not show what these other pins are i.e. does not show address pins, and i/o pins as such,so what is it i have no idea,

I looked a generic 6502 processor on google and it shows different VCC and GND pins and clearly shows address pins, if I am not wrong, address pins are used for parallel memory access, and it is the in/op pins that can be configured to e.g. 4 x 4 matrix keyboard to input 16 different switch states, 4 horizontal matrix lines are at pins 3,4,5,& 6 with 47K pull down resistoirs to ground, and whilst 4 vertical lines are at pins 7,8,9 & 10, each switch contact is in series with a diode whose cathod (the band side) facing the horizontal lines, (schottky diods with low forward voltage drop)

So what the heck is this that Mrantz are using , the Schematic states the chip as LM6502C, yet the chip on the board was LC6502C


The volume control chip Mrantz are using is TC9177P, it requires a clock, and a strobe and data, which consists of 20 bits input serially. the data sheet is readily available from many data sheet sites for free.

I am having some problem with my manual override, the volume chip just keeps changing the volume level randomly since the processor is no longer feeding it any signals, but I wanted to leave this chip in, seems like I may have to pull out this volume chip and just use volume control pots, however i am not sure if the volume control chip has an active gain as I am not able to get full volume from pots alone. so in other words, the chip is forcing the volume down, even if the pots are fully turned up, then randomly or suddenly the amp will go into a full blast mode! blow my ears!


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 05, 2013 6:25 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8513
Location: Southern California
Quote:
I looked a generic 6502 processor on google and it shows different VCC and GND pins and clearly shows address pins, if I am not wrong, address pins are used for parallel memory access, and it is the in/op pins that can be configured to e.g. 4 x 4 matrix keyboard to input 16 different switch states, 4 horizontal matrix lines are at pins 3,4,5,& 6 with 47K pull down resistors to ground, and whilst 4 vertical lines are at pins 7,8,9 & 10, each switch contact is in series with a diode whose cathod (the band side) facing the horizontal lines, (schottky diods with low forward voltage drop)

A 6502 DIP's address lines are on pins 9 through 25, minus pin 21. The data lines are on pins 26 through 33. These plus R/W\ (pin 34) and phase 2 (pin 39) all control access to memory and to memory-mapped I/O. The 6502 has no onboard memory or I/O to speak of. It's all external. Having those things all on one IC would make it a microcontroller, and the 6502-based microcontrollers have different numbers, like 65c19, 65F11, and 65134.

If you could figure out what the mystery IC is supposed to do, you could replace it with another microcontroller (probably with a little adapter board, since the pinouts would probably be incompatible), and write the program to do the job; but it would be a rather large project! (6502.org reflects a lot of large projects by the members, both in hardware and software, and we would be glad to see you jump into this and be successful, but they do take time.)

_________________
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 Apr 05, 2013 12:12 pm 
Offline
User avatar

Joined: Mon Apr 23, 2012 12:28 am
Posts: 760
Location: Huntsville, AL
Mike:

From my search, the LC6502 part is a Sanyo 4-bit microcomputer. It is ROM-based, so in addition to the basic information regarding the instruction set and peripherals, you'd need the ROM code. In other words, you'd need the code that your Amp manufacturer supplied Sanyo before their custom LC6502's were built.

I was able to locate some minimal data through various datasheet archive sites, but was not able to locate a user guide or a data sheet that's more than just a summary of the processor's features. I also located what appears to be to reference designs, and one of them is a graphic equalizer.

I think that in previous posts on this topic, someone else mentioned that the LC6502 was a 4-bit microcomputer. Perhaps they may know where to locate a detailed datasheet or user guide.

_________________
Michael A.


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 10 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: