Which microprocessor should I learn first?
I have a Propeller chip set up so it can do video output and support for a microprocessor. Note I'm talking about learning microprocessors, not microcontrollers. I already have the microncontroller (the Propeller) working well; now I want to try making it work with a "coprocessor". I'm not interested in efficiency; I just want to build a trainer for an old fashioned microprocessor purely for the educational value.
The problem is I just can't decide which one to use! So here's a list of some of the microprocessors I have in my junk box (lol it's well stocked):
6502
Z80
8031
8080
8085
8086
CDP1802
6800
68000
I will eventually do something with all of them, but which one should I focus on first? What's the coolest old-school uProc of all?
The 8086 has the benefit that I already have many years experience programming in 8086 assembly language for the PC. That makes me feel like I'd have an edge on getting the hardware working, simply because I am already so familiar with all the other aspects of the chip. I have an assembler for the 8086 (nASM) that is really, really good. On the other hand, wiring up a 16 bit chip is going to require about twice as much work as an eight bit; not only are there more data lines, but I will need two chips most places that I only need one for an 8 bit chip. Plus Intel's chip designs are, how should I put this, "screwy?" I mean, I look at the datasheet for the 8086, the pinouts, bus signals, the weird 1/3 duty cycle clock, etc., and it's like, what the f---? My theory is the Intel engineers were on all pot in the 70's.
The 68000 is the most powerful chip of the group, for what it's worth. But it has the same problem as the 8086 in that it is 16 bit and will be more work to hook up. An old programmer here at NASA tells me that the instruction set of the 68000 is an assembly language programmer's dream come true.
The 6800 is the 8 bit predecessor of the 68000. The 6800 has something called the "halt and catch fire" instruction (HCF) which was an undocumented test opcode that stops your program and then accesses memory in sequential order as fast as the processor can crank out addresses - ostensibly this could abuse the bus enough to burn up something. Some sources claim you can't burn up a bus this way; don't listen to the nay-sayers - I have faith that the Halt and Catch Fire instruction probably caused a bus contention and burned up some computer somewhere. But I wonder if I could use the HCF instruction to make the 6800 cycle memory addresses on purpose; I could supply the data to write to RAM and let the 6800 act like a counter to access each address, so that I wouldn't have to connect extra lines to the memory address lines in order to load a program in RAM.
The Z80 might be ok. I like the fact that it can tolerate a clock signal down to DC; being able to single step the clock will really help me troubleshoot bus cycles. I already have a commercial trainer for the Z80, but I didn't bring it down to Texas with me, doh!
The CDP1802 is cool just because it's so unusual. It seems like it was actually a really advanced design for it's time, though it wasn't very fast. I don't think it was ever terribly successful, although it was used in the Voyager space probe, so we can reasonably say the CDP1802 has been taken "farther" (in the literal sense) than any other processor! It has a "unique" programming scheme - it has no CALL instruction, you can make any arbitrary register be the new instruction pointer! Fun! Stupid, but fun! And with the 1 bit output pin it would be super-easy to verify it is working; just write a program that toggles the output pin. Plus it has four user-defined input pins that could be used for buttons or whatnot. This chip scores lowest on my "future applicability" scale for learning it, but looks like a very good chip for hobby computers.
Now the 6502, ah, there's a surprise: I can't believe how much information there is on this chip! I had always thought of it as, "That weird CPU with no registers that they used in the original NES." Not true! Tons of people have made homemade computers based on the 6502. And there's a wealth of info on troubleshooting it and on setting up a nop input to test it. That makes me think there must be something about this chip that makes it a good target for a hobbiest. I looked at the pinout and I thought it was very simple, maybe even easier to understand than the Z80. I'm leaning towards the 6502 as the first microprocessor I try out.
The problem is I just can't decide which one to use! So here's a list of some of the microprocessors I have in my junk box (lol it's well stocked):
6502
Z80
8031
8080
8085
8086
CDP1802
6800
68000
I will eventually do something with all of them, but which one should I focus on first? What's the coolest old-school uProc of all?
The 8086 has the benefit that I already have many years experience programming in 8086 assembly language for the PC. That makes me feel like I'd have an edge on getting the hardware working, simply because I am already so familiar with all the other aspects of the chip. I have an assembler for the 8086 (nASM) that is really, really good. On the other hand, wiring up a 16 bit chip is going to require about twice as much work as an eight bit; not only are there more data lines, but I will need two chips most places that I only need one for an 8 bit chip. Plus Intel's chip designs are, how should I put this, "screwy?" I mean, I look at the datasheet for the 8086, the pinouts, bus signals, the weird 1/3 duty cycle clock, etc., and it's like, what the f---? My theory is the Intel engineers were on all pot in the 70's.
The 68000 is the most powerful chip of the group, for what it's worth. But it has the same problem as the 8086 in that it is 16 bit and will be more work to hook up. An old programmer here at NASA tells me that the instruction set of the 68000 is an assembly language programmer's dream come true.
The 6800 is the 8 bit predecessor of the 68000. The 6800 has something called the "halt and catch fire" instruction (HCF) which was an undocumented test opcode that stops your program and then accesses memory in sequential order as fast as the processor can crank out addresses - ostensibly this could abuse the bus enough to burn up something. Some sources claim you can't burn up a bus this way; don't listen to the nay-sayers - I have faith that the Halt and Catch Fire instruction probably caused a bus contention and burned up some computer somewhere. But I wonder if I could use the HCF instruction to make the 6800 cycle memory addresses on purpose; I could supply the data to write to RAM and let the 6800 act like a counter to access each address, so that I wouldn't have to connect extra lines to the memory address lines in order to load a program in RAM.
The Z80 might be ok. I like the fact that it can tolerate a clock signal down to DC; being able to single step the clock will really help me troubleshoot bus cycles. I already have a commercial trainer for the Z80, but I didn't bring it down to Texas with me, doh!
The CDP1802 is cool just because it's so unusual. It seems like it was actually a really advanced design for it's time, though it wasn't very fast. I don't think it was ever terribly successful, although it was used in the Voyager space probe, so we can reasonably say the CDP1802 has been taken "farther" (in the literal sense) than any other processor! It has a "unique" programming scheme - it has no CALL instruction, you can make any arbitrary register be the new instruction pointer! Fun! Stupid, but fun! And with the 1 bit output pin it would be super-easy to verify it is working; just write a program that toggles the output pin. Plus it has four user-defined input pins that could be used for buttons or whatnot. This chip scores lowest on my "future applicability" scale for learning it, but looks like a very good chip for hobby computers.
Now the 6502, ah, there's a surprise: I can't believe how much information there is on this chip! I had always thought of it as, "That weird CPU with no registers that they used in the original NES." Not true! Tons of people have made homemade computers based on the 6502. And there's a wealth of info on troubleshooting it and on setting up a nop input to test it. That makes me think there must be something about this chip that makes it a good target for a hobbiest. I looked at the pinout and I thought it was very simple, maybe even easier to understand than the Z80. I'm leaning towards the 6502 as the first microprocessor I try out.
Comments
If you think that the Parallax forums might be somehow "beneath" someone who has worked for aerospace, I would say that whether you're building a radio control snow blower, or sending men to the Moon, hey, it's all engineering brother. Every project is different but the kind of challenges faced by all engineers are the same: We take an idea that works great in the imagination, and run into countless devils in the details. We work them out, build prototypes that (usually) fail the first time. We deal with dejection then and when we have problems we get stuck on; then feel elation when we finally figure out what seemed impossible. It's the enterprising, scientific spirit, and the joy of creation. We all work on different projects but as engineers we FEEL the same things and share the bond of a common experience.
A little over the top there I think - have a look at the detail supplied by Chip Gracey - I know the propeller has a destiny far greater that that of a snowblower ....
I must say I find your posts very cryptic.
Consider it gotten.
I would rather believe in the basic good in the world, and be let down, than to live in a world where I didn't think there was any good at all.
You must come from a rough place.
If you applied that to literature, no one would ever read Shakespeare anymore, either...
You will probably find that many modern I.C's derived some influence from those 'old school' variants - you will also notice the intrest in retro dev. going on - look at femtobasic by Mike Green.Also emulation of retro computers from Sinclair Zx Spectrums and so on. This type of work can be very beneficial when it comes to gaining a deeper understanding of how the I.C works as well as unearthing some interesting off shoots as a direct result. That is not to say it is all 'retro' - plenty of 'modern' work going on out there - SD card from rokicki, PropCam by Phil Pilgrim (PhiPi), Ethernet by Harrison .....
Support from some of the soundest people on the planet - and all open source ... I await the preprogrammed snowblower with ethernet,propcam and sd card !!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Post Edited (Paul Baker (Parallax)) : 2/6/2007 7:44:34 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
The 8085 was used on the F-16, if I remember correctly, so it can't be all bad, even if it has multiplexed address/Data-bus...
The Z80, though, has two identical sets of registers, and an incredible interupt scheme, so is very interesting for simple multitasking.
(Both the 8085 and the Z80 are descended from the 8080, so they share a lot of the command set)
The 6502 is more the 'how low can you go' type. Some consider it the first RISC processor, even, and while it is easy to program, it takes lots of practice to do it well.
Both the 6502 and the Z80 are good starters for Assembly programming, and they'll both teach you to manage your resources properly.
(I haven't tried the 6800, so can't comment on that)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...