6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Sep 21, 2024 8:19 am

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Tue Feb 04, 2014 8:01 pm 
Offline

Joined: Tue Feb 04, 2014 7:30 pm
Posts: 6
I'd like to build a 6502 based 8-bit computer. Something like this: http://www.youtube.com/watch?v=cKoRRA4MyM4
I want to be able to load/write small assembly programs, and hook up the system to a PC for input and output similar to the method shown in the video (although that's an eZ80).
Unfortunately I'm very much a beginner, not just to the 6502, but electronics in general. I'm a programmer and familiar with C/C++ but never did assembly.

Here's where I am now.

Electronics Knowledge
---------------------
Ohm's Law
Kirchoff's Law
Basic circuit symbols (resistors, capacitors, ground, etc)

As far as electronics knowledge, I know there's lots I'll have to learn. I'm hoping you guys can give me a list of topics to research. It's my hope that I can explore electronics concepts through this project directly and avoid building AM radios and other beginner electronics projects.


Equipment
----------
Agilent U1242B DMM
Weller WES51 Soldering Iron

I don't have an oscilloscope yet, but I was looking at acquiring a Rigol DS1102E based on a recommendation from the 6502 primer put up by Garth Wilson. Also based on his recommendation I'm looking at the Global Specialties 1310 power supply. Is there any other equipment I'll need?


Components
------------
None

I don't know what I'll need yet and I assume that will be determined based on the design I come up with or an existing schematic that I follow. I'd just like to avoid 20 trips to the store because I didn't realize I needed a specific component. So having as complete a list as possible at the beginning would be helpful.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 04, 2014 8:41 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8510
Location: Southern California
Welcome!
Quote:
I'm a programmer and familiar with C/C++ but never did assembly.

Assembly of course gives you the greatest control possible, and the best performance for a particular processor, and it is far more practical to take advantage of that on the 6502 than it is on many of the much more complex modern processors; but after you get your feet good and wet on it, there are things you can do in it (using macros) that don't immediately meet the eye, things which can effectively raise the level of the language a lot, yielding the benefits of faster development and better control and maintainability without forfeiting the performance and control benefits of assembly.

Quote:
Ohm's Law
Kirchoff's Law
Basic circuit symbols (resistors, capacitors, ground, etc)

Since we're on the subject, I would say Thevenin's theorem and Norton's theorem would come ahead of Kirchhoff's. These are pretty simple, requiring only basic math functions and no higher-level math at all, and will take you a long way. When it comes to throwing in capacitors and inductors in the circuits, you just do the same thing but with complex numbers, ie, ones having a real and imaginary part such that you put them on a graph rather than a number line. Actually though, I dare say that most on this forum don't have a good handle on it, yet are building their own computers.

Quote:
Is there any other equipment I'll need?

(repeated from an earlier post: ) Dave Jones has a video blog on setting up an electronics lab, at https://www.youtube.com/watch?v=R_PbjbRaO2E. I posted about it on the sparkfun forum in response to someone's question, and the OP said he didn't think he would need 90% of that stuff. But like Dave said near the end, a lot of that stuff gets accumulated slowly over the years. He discusses the very basics at the beginning though, and I agree with most of it. I've seen here where beginners really cause themselves a lot of trouble and frustration by not getting for example a good DMM and power supply like Dave talks about, and a basic 20MHz dual-trace, triggered analog oscilloscope. Without an oscilloscope, you're working in the dark. It's far more important than some of the things (like simulators) that beginners think they need.

Quote:
I'd just like to avoid 20 trips to the store because I didn't realize I needed a specific component. So having as complete a list as possible at the beginning would be helpful.

Even after I've been at this for decades and have somewhere near a quarter million parts in my office and probably another half million in the garage, making up a shopping list is still always far more time-consuming than I wish it were. My #1 shopping place is probably Mouser, followed by Digi-Key and Jameco. There are others, but these are my primary ones. They will have far more than any store you can drive to. If you see 20 versions of what seems to be the same thing and need help chosing one, just ask here. I like to get my list together and call them up with credit card in hand, rather than order online. Having a list of the stock numbers and prices and quantities makes the process very quick.

_________________
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: Tue Feb 04, 2014 11:43 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8390
Location: Midwestern USA
Legion6789 wrote:
I'd like to build a 6502 based 8-bit computer. Something like this: http://www.youtube.com/watch?v=cKoRRA4MyM4 ...

Well, you've come to the right place. :D

However, if I may, I'd like to suggest that you initially scale back your aspirations and build something more basic. That video gets into external buses, SPI and several other things that will be non-trivial to implement. You really want to start with basic I/O by using a 65C22 VIA and a UART, either a 65C51 or other. Later on when you've gotten much more familiar with what is going on in the hardware you can expand your horizons.

We really don't like to see anyone fail with their first 6502 project. In many cases, failure results from designing in a level of complexity that the hobbyist can't debug when things go awry. Starting out with a simple design almost guarantees some degree of success if you do your homework.

You will need to learn the 6502 assembly language at some point, and the best way to do so is by playing around with a 6502 simulator. The one I linked runs on all Windows flavors that have an NT kernel.

Lastly, don't be shy about asking questions, but do spend some time rummaging around here before asking. Chances are good that your query has already been addressed. If you have a number of questions it is helpful to create a topic in which to post them. Others will then be able to respond in the same topic and keep everything somewhat organized.

Glad to see you're interested in the 6502 family.

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


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 05, 2014 8:52 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
Hi Legion, and welcome!
Let me re-use a quote:
Quote:
I'm reminded of Thomson's Rule for First-Time Telescope Makers: "It is faster to make a four-inch mirror then a six-inch mirror than to make a six-inch mirror" - not that I even own a telescope.

On those lines, I'd recommend building an existing minimal design first - Grant Searle's Compukit is a good one. See http://searle.hostei.com/grant/uk101/uk101.html
That's assuming you're interested in soldering(*) components to boards - another approach is to put all the hardware into FPGA. It's still hardware, but at a different level.

Cheers
Ed

(*) Note that you can make a low-speed simple computer on a solderless breadboard. It won't be especially reliable, but it can be done. As soon as you mention higher speeds you'll get additional observations and advice. It's the same as the telescope point: start small, simple and slow and a lot of second-order considerations are irrelevant.


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 05, 2014 10:29 am 
Offline
User avatar

Joined: Fri Oct 31, 2003 10:00 pm
Posts: 200
Legion6789 wrote:
I'd like to build a 6502 based 8-bit computer. Something like this: http://www.youtube.com/watch?v=cKoRRA4MyM4
I want to be able to load/write small assembly programs, and hook up the system to a PC for input and output similar to the method shown in the video (although that's an eZ80).
Unfortunately I'm very much a beginner, not just to the 6502, but electronics in general. I'm a programmer and familiar with C/C++ but never did assembly.


For a first 6502 system you may have a look at the kits offered by Vince Briel. The microkim kit especially fits your demands.
All components included, attach to PC via USB, easy to follow guidelines and a helpful hand by Vince if things go wrong.

Once you have a working real system it is much easier to build/design your own kit and system software and compare your system with a working one. And then you also may like to add some equipment like a simple logic analyser or a 20 MHz analog scope to your workbench.


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 05, 2014 8:04 pm 
Offline

Joined: Tue Feb 04, 2014 7:30 pm
Posts: 6
Thanks for the replies.

I put in an order for the following equipment:

Rigol DS1102E Oscilloscope
Global Specialties 1310 Power Supply
Extech E330 DMM (as a backup/secondary for my Agilent)
DMM Leads for my Agilent (not too fond of the ones it comes with)
Solder (60/40, 2.2% flux, 0.6mm, thinnest I could get)
Desoldering Braid
Pack of 12 different soldering tips (I tried to get more of the screwdriver/chisel variety)
Solder Sucker
Two Breadboards (a 4 column and a 2 column)
Jumper Wires
IPA
Compressed Air

I'll hit the local surplus store to pick up various resistors, capacitors, etc, this weekend. Figure it'd be good to have a stash of basic components. While I'm waiting for this stuff to arrive I'm going through allaboutcircuits.com to improve my electronics knowledge.


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 05, 2014 8:39 pm 
Offline
User avatar

Joined: Fri Oct 31, 2003 10:00 pm
Posts: 200
Legion6789 wrote:
Thanks for the replies.

I put in an order for the following equipment:

Rigol DS1102E Oscilloscope
Global Specialties 1310 Power Supply
Extech E330 DMM (as a backup/secondary for my Agilent)
DMM Leads for my Agilent (not too fond of the ones it comes with)
Solder (60/40, 2.2% flux, 0.6mm, thinnest I could get)
Desoldering Braid
Pack of 12 different soldering tips (I tried to get more of the screwdriver/chisel variety)
Solder Sucker
Two Breadboards (a 4 column and a 2 column)
Jumper Wires
IPA
Compressed Air

I'll hit the local surplus store to pick up various resistors, capacitors, etc, this weekend. Figure it'd be good to have a stash of basic components. While I'm waiting for this stuff to arrive I'm going through allaboutcircuits.com to improve my electronics knowledge.

Looks like an adequate workbench ;) The DSO will be of value!

Now add some IC's (RAM , EEPROM, CPU, glue logic) and some software like Eagle or comparable to document your designs!


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 05, 2014 8:47 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
Yes, it's worth noting that you'll most likely need to program an EPROM to boot from (or possibly to hold your OS and maybe even your application code.) $50 for a basic model seems possible: http://www.ebay.co.uk/bhp/eeprom-programmer .

We have a thread or two elsewhere speculating about different ways to get a system booted, but an EEPROM is the obvious way.

Cheers
Ed


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 05, 2014 8:56 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8510
Location: Southern California
BigEd wrote:
Yes, it's worth noting that you'll most likely need to program an EPROM to boot from (or possibly to hold your OS and maybe even your application code.) $50 for a basic model seems possible: http://www.ebay.co.uk/bhp/eeprom-programmer .

Make sure it will do parallel EEPROMs. These will normally have at least 28 pins. The one at the top of the page when I clicked on the link was only for the 8-pin serial ones.

_________________
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 Feb 05, 2014 10:12 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8390
Location: Midwestern USA
Legion6789 wrote:
Solder (60/40, 2.2% flux, 0.6mm, thinnest I could get)

That's probably smaller than actually needed. I built my POC V1.1 unit with two pieces of SOIC silicon and manually soldered both with 0.032 inch (0.8mm) 60/40, Radio Shack part number 64-009. The soldering iron tip size is more important in close work than the solder size. In a pinch, I've made repairs with .062 inch (1.5mm) solder.

Quote:
IPA

IPA? In many pubs, IPA means India Pale Ale, a brew with which our UK friends would be familiar, as that is where it originated. :lol:

Quote:
Compressed Air

Are you referring to air from a mechanical air compressor?

Quote:
I'll hit the local surplus store to pick up various resistors, capacitors, etc, this weekend. Figure it'd be good to have a stash of basic components. While I'm waiting for this stuff to arrive I'm going through allaboutcircuits.com to improve my electronics knowledge.

In digital work, carbon film resistors are preferred over carbon composition types. X7R MLCC capacitors are good for decoupling purposes and low-ESR electrolytics for general bypassing. MLCC capacitors should have a working voltage at least five times the highest steady-state voltage to which they will be exposed. In a typical 5 volt circuit, you would use a 50 volt working rating, as that is a very common stocking item with distributors. Electrolytics' working voltage, on the other hand, should be as close to the steady-state voltage as practical, but at least 10-15 percent higher to allow for voltage fluctuations.

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 07, 2014 8:26 pm 
Offline

Joined: Tue Feb 04, 2014 7:30 pm
Posts: 6
Picked up an analog scope at a local surplus store since I've read in a lot of places that it's helpful to have an analog scope in addition to a digital one. I ended up with a Tektronix 468. I have to admit it was uncomfortable buying something used/final sale that I don't know anything about. The guy tested it out and everything looked ok, but I'd really have no idea if something was wrong.


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 07, 2014 8:51 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8510
Location: Southern California
Hopefully you got a good pair of probes with the 'scope. (The following is from my 6502 primer page on basic workbench equipment.) Use them in the x10 switch position. In the x10 position, the oscilloscope's .1V-per-division setting becomes 1V per division, and so on; but they are never any good for the higher speeds in the x1 position! The 'scope should come with probes. Take care of them, because they're not cheap to replace. There's a lot more to good probes than meets the eye, and a decent pair for a low-end oscilloscope will cost you at least $40 or $50. (They can be many times that expensive for the faster 'scopes!) If you get a used 'scope, either be sure you get good probes with it, or budget some money to buy some.

I've used a Philips digital scope which also had an analog mode, but its design was so good that I never used the analog mode except when the digital part was not fast enough. I have seen others though, especially scope meters (like a big DMM that acted like a DSO) which were enough to drive you bonkers trying to figure out the signal you were trying to see. Edit, May 2021: My work got me an Agilent DSO1004A four-channel DSO. I hate it. It is so hard to use! The Philips interface was way, way better.

_________________
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 Feb 07, 2014 9:19 pm 
Offline

Joined: Tue Feb 04, 2014 7:30 pm
Posts: 6
Probes are good. He gave me two NOS Tektronix scopes. They were still sealed in the bag. We opened and tested them and they seem to work. The scope is 100MHz, the probes are 150MHz. However the probes are x10 only. Is that going to be a problem? Should I buy some x1 probes?


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 07, 2014 9:24 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8510
Location: Southern California
x1 probes are not much good for anything, because their frequency response may only be a couple of MHz and they will load the circuit down a lot. Use what you have.

_________________
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 Feb 07, 2014 11:53 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8390
Location: Midwestern USA
Legion6789 wrote:
Probes are good. He gave me two NOS Tektronix scopes. They were still sealed in the bag. We opened and tested them and they seem to work. The scope is 100MHz, the probes are 150MHz. However the probes are x10 only. Is that going to be a problem? Should I buy some x1 probes?

My probes have x1 and x10 switches. I think the switches are permanently stuck in the x10 position because I have never used x1 for anything.

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


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron