Getting started with microprocessors

I'm not sure if this is the right place to post this question seeing as it's not really a physical project, but it seemed to be the best suited part of the forum.

So I'd like to start moving away from microcontrollers and begin working with microprocessors instead, seeing as they seem to be the next step up. Unfortunately, I'm at a loss as to where I should start. While a microcontroller has everything it needs to function inside of a single chip, a microprocessor needs external RAM, ROM, UART, etc. which is where the trouble lies. It seems that the Zilog Z80 family seems to be a good, simple place to start but I haven't searched around much. Basically I'm looking for a tutorial that shows how to choose and hook up external RAM and ROM, and more importantly, how to write programs (assembler I'm guessing) and how to upload these programs into the ROM chip.

The arduino pisses all over the first Z80 CPU I had in both speed and RAM. If your looking to get into microprocessors then maybe consider something using an ARM chip. Dare I say Raspberry Pi or one of it's ilk or maybe hold out for the Arduino ARM thingy (Not sure of it's name)

Riva: The arduino pisses all over the first Z80 CPU I had in both speed and RAM. If your looking to get into microprocessors then maybe consider something using an ARM chip. Dare I say Raspberry Pi or one of it's ilk or maybe hold out for the Arduino ARM thingy (Not sure of it's name)

The Arduino ARM thingy is called the DUE, though I don't believe it is available for sale at the moment.

It depends on what you want to do. Do you want to do embedded programming like you've been doing with the Arduino? Are you wanting to run Linux or similar OS to run things like a LAMP stack (originally Linux, Apache, MySql, Perl/PHP, but more generally a web server)? What is your ultimate destination? Are you wanting to run Android instead of Linux, perhaps on a tablet? If you don't know where you are going, then it doesn't matter what you choose. :roll_eyes:

These days you can get evaluation boards for a lot of the embedded chips, though the development environments may or may not be free. I tend to think the ARM processors have the mind-share in terms of popularity, but there are other choices like MIPS and PowerPC.

For the embedded side of things, some of the ARM chips that I've bookmarked include:

Now I have the Rasberry PI, but I haven't had time to set it up yet. My impression is out of the box it is more aimed at the low end workstation than embedded programming, though as more people get their hands on the PI, this is changing. Adafruit has been adding pie-plates (equivalent to Arduino shields) and other things for the r-pi, and they have a tweaked Linux that they are experimenting with that is more setup to do hardware hacking than the official releases: http://learn.adafruit.com/adafruit-raspberry-pi-educational-linux-distro. I should mention that Adafruit also sells beaglebones and extras for that.

Are you wanting to run Linux

...in which case, you should not be looking at a Z80.

ARM designs are not for the faint-hearted, but a Z80 (if you can still get DIL devices) can be done in about 5 devices (plus crystal). You'd need a processor, ROM (UVEPROM if you can still buy them), RAM (single device static RAM), something like a 74138 for decode and a UART chip, which would also give you some parallel I/O.

There used to be lots of good hobbyist books (Sybex et el?), or Circuit Cellar style publications.

AWOL:

Are you wanting to run Linux

...in which case, you should not be looking at a Z80.

Well there have been Z-80 unixes in the past, such as http://p112.sourceforge.net/uzidoc.html

AWOL: ARM designs are not for the faint-hearted, but a Z80 (if you can still get DIL devices) can be done in about 5 devices (plus crystal). You'd need a processor, ROM (UVEPROM if you can still buy them), RAM (single device static RAM), something like a 74138 for decode and a UART chip, which would also give you some parallel I/O.

There used to be lots of good hobbyist books (Sybex et el?), or Circuit Cellar style publications.

However, I suspect the OP wanted to go with something more powerful.

It depends heavily what is your goal to achieve - I know a lot of retro computing guys who build 8080, 8085, z80, 6502, 1802 based machines today. When you are chasing more speed then the today's microcontrollers are much better. I've built my first computer in '82 (8085, 2732, 6116, 8155, 8255, 8254, 8251, plus red LED display) and it still works, however it takes ~600mA current, and it is equivalent to an atmega328p @ 0.5MHz.

What I am missing too are general purpose CPUs for hobbyists, with larger memory space, so you can develop larger stuff - something like MC68000 (my favorite) or similar. I am looking for a dragonball 68ez328 (it was used in Palm pdas) as it has everything inside it (like an mcu) and you can (you have to - as it is a CPU without memory) add up to 16MByte ram/rom, so I would say that CPU is the best thing you can get today (if you are happy to get it somewhere). Google "MC68EZ328 User's Manual".. When not considering ARMs and MIPS' of course :)

However, I suspect the OP wanted to go with something more powerful

The great thing about the five chip design is that it is very easy to see how to get up to a full 64kbyte system, with a mix of ROM, RAM and I/O.

Wow, thanks for all of the replies, I wasn't expecting that many. I suppose I had better explain my goal though as I didn't really mention it in the beginning.

Eventually I would like to use an ARM in an embedded design like a tablet/iPod touch/palm Pilot etc. Recently I have finished working on such a device using an ATxmega256D3 but it simply doesn't have the speed I want, and as far as I can tell, moving onto microprocessors will give the speed that I require. My first thought was to buy an ARM microprocessor but I quickly realized that it's far more complex to use than a simple microcontroller. So as a beginning step I decided I would try out something like a Z80 just to get familiar with microprocessors (assuming today's ARM architecture is anywhere near the same), hence this thread. Now for all I know, (which isn't much when it comes to microprocessors) starting with an ARM microprocessor might be just as easy as starting with a Z80. If so, does anyone know of an open source ARM dev board which I can get the gerbers for and etch at home? I've seen a few dev boards around but they cost $30 not counting shipping so I'd much rather just make one myself. But then there's still the question of uploading code. I'm guessing ARM uses a JTAG interface which I don't have a programmer for, but I've heard that one can bitbang it through a parallel port. Is this a viable option?

I decided I would try out something like a Z80 just to get familiar with microprocessors (assuming today's ARM architecture is anywhere near the same),

They're not. There are whole generations of processors between the two. If anything, being a RISC processor, the AVR is closer to being an ARM than a Z80 or 68000 or just about any of their contemporaries. However, being a Harvard and not von Neumann architecture, the AVR is not like most microprocessors.

I can recommend you the STM32F4 Discovery kit then - it cost you $17 or so, you get the best cortex M4 chip today @168Mhz (192kB ram, 1MB flash), lot of other stuff on the board, and what is very important for you, there is a programmer on the board (with dubugger), and all dev tools are free. So you can start immedieately with developments.

I didn’t even realize they made microcontrollers that fast! Maybe there’s really no point in switching over to microprocessors then, I might just buy a STM32F407VG or something seeing as it runs at 3.3v, and it has SDIO and I2S (both of which would be highly beneficial). I just looked through the STM32F4 series datasheet and it seems to have both JTAG and something called serial wire debug (SWD). From what I’ve read so far this SWD seems to have just a single clock and data pin like PDI. Is it compatible? Alternatively I could probably make some sort of JTAG programmer with an ATmega16u2 I have laying around. I’d need to read up on it though.

EDIT:

all dev tools are free

I just looked and it seems that they are all either 30 day trials or have a code size limitation. What specifically are you talking about?

MC68000 (my favorite) or similar

Same here, I loved the architecture and the assembly language instruction set.

bobthebanana:

all dev tools are free

I just looked and it seems that they are all either 30 day trials or have a code size limitation. What specifically are you talking about?

There are gnu versions of GCC available for the ARM that I believe are working (or in progress) for the STM series. Do a search on hackaday.com, there was an article about it a while ago.

If you are looking to make a Z80 computer for fun, I applaud you. Go for it. There are many people who have treaded this water so you are not going to be a trailblazer here. Search "Z80 computer schematic" and you will find some goodies, among them:

http://www.cosam.org/projects/z80/ http://www.cosam.org/projects/z80/schematics.pdf

But as you noted in all the replies, it isn't going to outperform modern microcontrollers nor interface better to practically anything, in fact it will be a pain to interface it to modern I2C or SPI devices. Still, many people do it for fun and experience.

pito: I can recommend you the STM32F4 Discovery kit then - it cost you $17 or so, you get the best cortex M4 chip today @168Mhz (192kB ram, 1MB flash), lot of other stuff on the board, and what is very important for you, there is a programmer on the board (with dubugger), and all dev tools are free. So you can start immedieately with developments.

Wow, that is a freaking deal. I am buying two from Digikey just to mess with it. $15 each there now.

High grade free dev tools: . Yagarto http://www.yagarto.de/ . Sourcery Codebench Lite http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/ . Atollic TrueStudio Lite http://www.atollic.com/index.php/truestudio

There is a complete preconfigured ready package with Eclipse (Eclipse+Yagarto+Debugger, just download and use, no setup required) for STM32F4 with one of the best RTOSes (400ns context switch) with great forum support: http://chibios.org/dokuwiki/doku.php?id=start http://sourceforge.net/projects/chibios/files/ChibiStudio/

pito: High grade free dev tools: . Yagarto http://www.yagarto.de/ . Sourcery Codebench Lite http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/ . Atollic TrueStudio Lite http://www.atollic.com/index.php/truestudio

There is a complete preconfigured ready package with Eclipse (Eclipse+Yagarto+Debugger, just download and use, no setup required) for STM32F4 with one of the best RTOSes (400ns context switch) with great forum support: http://chibios.org/dokuwiki/doku.php?id=start http://sourceforge.net/projects/chibios/files/ChibiStudio/

Thanks again, Digikey will have this to me Friday. Too bad this weekend is so freaking busy for me, but I will certainly break the board out and load the software.

I did a google on STM32F4 Discovery kit, and ran across this posting: http://www.designspark.com/knowledge/stm32f4-cortex-discovery-kit-st-electronics.

I have no idea how accurate the complaints are, but thought I might pass it along. At the price the STM32F4 certainly looks cheap to hack, and I could imagine putting up with some problems due to the cost. Heck the Arduino has a number of special features, like only certain pins can be PWM pins, and things like the servo library turn off PWM on two pins.

I am running eLua on the STM32F4 Disco kit, Chibios/Rtos, etc. With SDIO it makes 5MByte/sec write and 10MByte/sec read to class 4 sdcard, and the MP3 player (see chibios playground) sounds great as well (decoding via its own FPU/DSP, 20% cpu utilisation). Unfortunately the FPU is only 32bit fp :) :) p.

I'm definitely going to order one of the dev boards as well. But for the actual project I'm going to need it standalone. So what do I need for it to function? Just a crystal? (8Mhz with the PLL boosting it up I assume) Or does it have an internal clock which can be fed to the PLL for 168MHz operation? Also just a question about the SDIO interface. Is it compatible with SDHC and SDXC cards as well as just SD?

bobthebanana: I'm definitely going to order one of the dev boards as well. But for the actual project I'm going to need it standalone. So what do I need for it to function? Just a crystal? (8Mhz with the PLL boosting it up I assume) Or does it have an internal clock which can be fed to the PLL for 168MHz operation? Also just a question about the SDIO interface. Is it compatible with SDHC and SDXC cards as well as just SD?

Creating a design pc board for an ARM processor (which the ST Micro is) is not a beginner level project. When you get to the speeds being used there, the design criteria are a lot less forgiving than for slower processors. This is not really a 'breadboard' capable project.