6502 "Microcontroller" (First Project, No longer on hiatus)

Building your first 6502-based project? We'll help you get started here.
User avatar
MikeDev101
Posts: 13
Joined: 16 Jul 2020
Contact:

6502 "Microcontroller" (First Project, No longer on hiatus)

Post by MikeDev101 »

Hello, I'm MikeDev. I recently extracted a small handful of electronic goods.

I extracted a MOS 6502AD processor, NEC D4364C-15L Static RAM, ATMEL AT49F010 70PC flash, a WINBOND W27E257-12 EEPROM, and a TOYCOM TCO-745A crystal oscillator @16.000 MHz (I'm not really sure about the clock, these 6502 chips typically run much slower than this, right?)

I don't have a fancy EEPROM programmer (yet), lots of breadboard or lots of spare wire. I don't mind getting technical. I also have some other spare chips that might help (FYI I extracted the CPU from a Commodore 1581 drive, mainly because I don't have a use for it since I don't own a commodore, AND I had to destroy the drive in the process because I suck at desoldering... And I didn't have any solder wick :( )

Is it possible to make a bare bones breadboard computer using this hardware? A basic, microcontroller-like design that is just a CPU, RAM, and Storage with some GPIO? (Now that I think about it, I'm basically asking if it's possible to create an Arduino with extra steps)

I was thinking about calling it "Poor man's Arduino", because of it's retro, general-purpose nature...
Last edited by MikeDev101 on Sun Dec 13, 2020 7:22 pm, edited 5 times in total.
User avatar
MikeDev101
Posts: 13
Joined: 16 Jul 2020
Contact:

Re: 6502 AD Breadboard microcontroller? ("Poor man's Arduino

Post by MikeDev101 »

Image attached is a look at what I have.
Attachments
20200715_232229.jpg
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: 6502 AD Breadboard microcontroller? ("Poor man's Arduino

Post by floobydust »

First, Welcome!

Second.... if you have a 1541 diskette drive, and it's complete, you might be better off selling it as a complete unit and use those funds to get a new CMOS W65C02S (which is rated at 14MHz vs the 1MHz 6502 you have) plus a few additional support chips, like a 65C22 VIA, some 74HC logic chips, etc.

I would also highly recommend reading Garth's 6502 primer... great resource, will answer most, if not all of your possible questions and will have some initial circuits to get you up and running quickly with a 6502. Link to Garth's site is: http://wilsonminesco.com/

You can also view the Projects link for this site and many of us have a github page with some of our projects which might be useful. I would recommend starting simple/minimal with a slow CPU clock, like 1MHz on a breadboard and build up from there once you have something working.
User avatar
MikeDev101
Posts: 13
Joined: 16 Jul 2020
Contact:

Re: 6502 AD Breadboard microcontroller? ("Poor man's Arduino

Post by MikeDev101 »

floobydust wrote:
First, Welcome!

Second.... if you have a 1541 diskette drive, and it's complete, you might be better off selling it as a complete unit and use those funds to get a new CMOS W65C02S (which is rated at 14MHz vs the 1MHz 6502 you have) plus a few additional support chips, like a 65C22 VIA, some 74HC logic chips, etc.

I would also highly recommend reading Garth's 6502 primer... great resource, will answer most, if not all of your possible questions and will have some initial circuits to get you up and running quickly with a 6502. Link to Garth's site is: http://wilsonminesco.com/

You can also view the Projects link for this site and many of us have a github page with some of our projects which might be useful. I would recommend starting simple/minimal with a slow CPU clock, like 1MHz on a breadboard and build up from there once you have something working.
I kinda regret wrecking that drive in the process of extracting those chips, though not entirely since it's power switch was forked up and I don't have a power supply for it... I'll probably reuse the oscillator for an Arduino instead, and probably invest in a W65C02S, and maybe some better equipment.
daniMolina
Posts: 214
Joined: 25 Jan 2019
Location: Madrid, Spain

Re: 6502 AD Breadboard microcontroller? ("Poor man's Arduino

Post by daniMolina »

MikeDev101 wrote:
and I don't have a power supply for it...
Just a little note... the 1541 doesn't not have an external power supply, it's connected directly to mains power.

About your question, you may need some additional ICs (A bit of glue logic is unavoidable) but, you should be able to make something with what you have. Sure, you need to step down the clock. There's no way a MOS6502 can run at 16 Mhz. Depending on the version you have, 2Mhz will already be too much.

As mentioned by floobydust, Garth's 6502 primer is a must. For me, it was enough to go from nothing to a working SBC in no time. You will also find plenty of information in the Hardware subforum. Lots of working SBCs, most of them with full schematics and code.

Good luck!
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: 6502 AD Breadboard microcontroller? ("Poor man's Arduino

Post by BigEd »

Indeed, welcome, Mike!

It's a nice idea for a starter project: the key is to keep it simple, and to proceed in steps.

You'll surely be able to run a NOP test, which is just barely exercising the CPU.

Beyond that, you pretty much need a way to program up an EPROM or EEPROM. The easiest way to do that is not the cheapest - it's to buy a cheap programmer. Hopefully you do have some budget for this new hobby!

It certainly is worth reading and revisiting Garth's primer. And we're here for questions.

A USB cable or USB charger is a pretty good source of 5V power. You'll do well to get yourself a multimeter (preferably with a frequency counting function and an audible continuity test function) and it's also good to have a logic probe.

You will need breadboarding wire and sundry resistors and capacitors.

If there's any guidance which doesn't seem to be in Garth's primer, this is a great opportunity to help to improve it.

Keep it simple!
John West
Posts: 383
Joined: 03 Sep 2002

Re: 6502 AD Breadboard microcontroller? ("Poor man's Arduino

Post by John West »

You will need a handful of logic chips (certainly a counter to drop the frequency of the oscillator). How big that handful is depends on how ambitious your design is. The 1541 has a variety of 74LS chips; you should be able to put something together from that. It's worth taking the 6522 as well - that's a great all-in-one I/O chip.
User avatar
MikeDev101
Posts: 13
Joined: 16 Jul 2020
Contact:

Re: 6502 AD Breadboard microcontroller? ("Poor man's Arduino

Post by MikeDev101 »

Correction once more: I had a 1581 drive. Doesn't really help working late at night on projects like this :lol:

Anyway, I hope that I find it helpful for the advice y'all shared. I'll see what I can do to that CPU. (Though, I am a tad bit concerned about the internal integrity, I had it on a hot soldering iron for an extended period of time...)
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: 6502 AD Breadboard microcontroller? ("Poor man's Arduino

Post by floobydust »

MikeDev101 wrote:
Correction once more: I had a 1581 drive. Doesn't really help working late at night on projects like this :lol:

Anyway, I hope that I find it helpful for the advice y'all shared. I'll see what I can do to that CPU. (Though, I am a tad bit concerned about the internal integrity, I had it on a hot soldering iron for an extended period of time...)
Those (1581) are more rare... there was a 1541-II that used an external supply, which was the same one as the 1581 and I think a model of the 1571. Seriously, I hope you didn't trash a 1581 for a processor... I think all had soldered processors. A working 1581 can get some good $$ online... I think it's one of the best diskette drives Commodore made. I have two myself and they are very nice drives.
daniMolina
Posts: 214
Joined: 25 Jan 2019
Location: Madrid, Spain

Re: 6502 AD Breadboard microcontroller? ("Poor man's Arduino

Post by daniMolina »

Well... Even if it's not working... A 1581 maybe still worth a couple hundred dollars. I'm sorry to tell you this, but that was a somewhat rare piece of equipment....
User avatar
cbmeeks
Posts: 1254
Joined: 17 Aug 2005
Location: Soddy-Daisy, TN USA
Contact:

Re: 6502 AD Breadboard microcontroller? ("Poor man's Arduino

Post by cbmeeks »

Oh my...I've seen 1581's sell for over $300 recently. They are very highly sought after.

Would you have all of the pieces to sell? Even a broken one would be worth something.
Cat; the other white meat.
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: 6502 AD Breadboard microcontroller? ("Poor man's Arduino

Post by floobydust »

While the 1581 can fetch some decent prices, you can easily build one for less... the most difficult part to obtain is the 6526 or 8520 part in a 2MHz version. Beyond that, everything is readily available, including the WD1772 FDC chip. While the Chinon drive has some odd pinouts, you can easily sub a Teac drive with a couple wiring changes. Granted... it's still a nice drive to have.

Back to the original topic... if the OP thinks he over-heated the 6502, I think it would be worth buying a new W65C02S and some support logic (74HCxxx) chips and start building something.
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: 6502 AD Breadboard microcontroller? ("Poor man's Arduino

Post by BigEd »

MikeDev101 wrote:
I'll see what I can do to that CPU. (Though, I am a tad bit concerned about the internal integrity, I had it on a hot soldering iron for an extended period of time...)
I'd agree: proceed with that CPU. You'll need to test what you build anyway.

Do you have the means of programming those non-volatile memory chips? I haven't checked the datasheets at all - I'm assuming you have a clutch of 5V parts and you plan to build a 5V computer. It's worth getting familiar with datasheets.
User avatar
Dr Jefyll
Posts: 3525
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: 6502 AD Breadboard microcontroller? ("Poor man's Arduino

Post by Dr Jefyll »

floobydust wrote:
if the OP thinks he over-heated the 6502, I think it would be worth buying a new W65C02S
It's actually pretty unlikely MikeDev101 overheated his 6502. As we've often heard Garth explain, semiconductor dice can withstand surprisingly high temperatures.

But a newly purchased 65C02 (either WDC, or Rockwell if one can be found) is still a good idea. It could be used to get the SBC running and then the SBC could be used to test the original NMOS CPU. And presuming the latter is functional then maybe it could be sold along with the other pieces of the drive.

(It's worth noting that, compared to NMOS 6502's, WDC C02's have some minor pinout differences that need to be observed. But the Rockwell pinout is identical to the original NMOS.)

-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: 6502 AD Breadboard microcontroller? ("Poor man's Arduino

Post by BigEd »

That's a fair point: having a spare, or an alternative, could be a help. But Mike needn't wait for that new part.
Post Reply