First 6502/electronics project
-
Legion6789
- Posts: 6
- Joined: 04 Feb 2014
First 6502/electronics project
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.
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.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: First 6502/electronics project
Welcome!
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.
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.
(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.
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.
Quote:
I'm a programmer and familiar with C/C++ but never did assembly.
Quote:
Ohm's Law
Kirchoff's Law
Basic circuit symbols (resistors, capacitors, ground, etc)
Kirchoff's Law
Basic circuit symbols (resistors, capacitors, ground, etc)
Quote:
Is there any other equipment I'll 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.
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: First 6502/electronics project
Legion6789 wrote:
I'd like to build a 6502 based 8-bit computer. Something like this: http://www.youtube.com/watch?v=cKoRRA4MyM4 ...
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!
Re: First 6502/electronics project
Hi Legion, and welcome!
Let me re-use a quote:
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.
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.
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.
Re: First 6502/electronics project
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.
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.
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.
-
Legion6789
- Posts: 6
- Joined: 04 Feb 2014
Re: First 6502/electronics project
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.
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.
Re: First 6502/electronics project
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.
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.
Now add some IC's (RAM , EEPROM, CPU, glue logic) and some software like Eagle or comparable to document your designs!
Re: First 6502/electronics project
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
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
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: First 6502/electronics project
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 .
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: First 6502/electronics project
Legion6789 wrote:
Solder (60/40, 2.2% flux, 0.6mm, thinnest I could get)
Quote:
IPA
Quote:
Compressed Air
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.
x86? We ain't got no x86. We don't NEED no stinking x86!
-
Legion6789
- Posts: 6
- Joined: 04 Feb 2014
Re: First 6502/electronics project
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.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: First 6502/electronics project
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.
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
-
Legion6789
- Posts: 6
- Joined: 04 Feb 2014
Re: First 6502/electronics project
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?
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: First 6502/electronics project
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: First 6502/electronics project
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?
x86? We ain't got no x86. We don't NEED no stinking x86!