33
votes
\$\begingroup\$

I harbor a secret fantasy (oops, not so secret anymore) to build a simple computer from scratch. I'm looking for an easy-to-use microprocessor to start with. I know about the usual suspects such as the 6502, 68000, 8086, Z80, etc. But I'm wondering if something better is out there. Here's my wish list:

Must have:

  • Low clock rate (4-25 MHz)
  • No more than 40-60 pins, preferably in DIP configuration
  • Ability to address around 64KB of memory, but up to 1MB or so would be good
  • Stored-program architecture (not read-only instruction space) (Edit: this rules out most low-end microcontrollers, like the PIC and AVR)
  • Flat memory model, not banked or segmented like the 8086

Would like, but not necessary to have:

  • RISCy instruction set (load-store)
  • General-purpose registers
  • Assortment of TTL I/O pins
  • Built-in flash ROM

What microprocessor or microcontroller would you suggest that's relatively easy to wire up and get the first ROM routines written for?

My goal is to get a simple Forth (or similar) system going. Just to say I did it.

Edit: After doing a bit of research, I think something like the ARM7 would suit me. It comes with a non-trivial amount of flash and SRAM to play with -- sometimes as much as 256K flash and 64K SRAM -- along with digital I/O, ADC, serial I/O, and more.

Here's one: the STR711 ARM development board.

\$\endgroup\$
7
  • \$\begingroup\$ Not really programming-related. Sounds more like a hardware question (i.e. superuser.com material). \$\endgroup\$
    – gnovice
    Aug 5, 2009 at 18:23
  • 3
    \$\begingroup\$ yes, but only a programmer audience can answer properly \$\endgroup\$ Aug 5, 2009 at 18:59
  • \$\begingroup\$ Do you want the device to handle keyboard, mouse and display on its own or are you only going to connect via serial? \$\endgroup\$
    – dwhall
    Aug 13, 2009 at 22:23
  • \$\begingroup\$ Serial would be fine for me. \$\endgroup\$
    – Barry Brown
    Aug 13, 2009 at 23:28
  • \$\begingroup\$ STR711 ARM is not really dip \$\endgroup\$
    – Gerhard
    Aug 14, 2009 at 13:22

15 Answers 15

15
votes
\$\begingroup\$

I agree that ARM is the way to go for 32-bit microcontrollers. ARM is ubiquitous and its assembly language can be used across a broad range of microcontroller families. ARM also has good support from the GCC toolchain. The ARM7TDMI chip architecture has dominated the 32-bit mcu space the last 5 years and the ARM Cortex-M3 is the emerging replacement. The Cortex-M3 does have a Harvard architecture (separate instruction and data address spaces), but I don't feel that's a limitation.

Micromint has a solid reputation, and they offer a Cortex-M3 board with configurable options for a decent price. However, if you really need DIP configuration, I've had success with the mbed

Now, the next thing is languages. You mentioned FORTH. I also recommend Python-on-a-Chip and eLua as powerful, easy to learn languages that work on this size target platform. eLua is more fully developed but has larger resource requirements than Python-on-a-Chip. Full disclosure: I'm the author of the PyMite VM used in Python-on-a-Chip. So, if your goal is to make your own language, I fully understand the joy of that exercise.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ ARM has separate instruction and data buses, the address space is unified (i.e. you can read instructions and execute data if you need). I would also recommend looking at the lower-end Cortex-Mx chips from NXP - check out LPCXpresso. \$\endgroup\$ Aug 24, 2010 at 21:52
7
votes
\$\begingroup\$

For small uC stuff Arduino, cheap, fun, good community

For ARM class machines the cheapest is probably sheeva plug they make an amazing complete machine built into a wallwart power supply and a slightly large single board machine with a lot more i/o

Or there is beagle board, aimed more at audio/video performance.

All of them run linux so you have a huge range of development software

\$\endgroup\$
1
  • \$\begingroup\$ Totally. Get the Fuzebox kit, put it together and hack little games (they're all free software so far, I think) for your TV. \$\endgroup\$
    – mattl
    Aug 5, 2009 at 18:21
5
votes
\$\begingroup\$

MSP430 from Texas Instruments has very low power consumption, small but very sane instruction set (unlike PIC), open-source tools and DIP format in their value line. They have just recently released a $4.30 (yes, that's four bucks thirty cents, free shipping) starter kit that includes USB interface for programming and debugging and two DIP chips to play with. Check it out.

\$\endgroup\$
1
  • \$\begingroup\$ That's pretty cool! I've bookmarked that site. :) \$\endgroup\$
    – Barry Brown
    Aug 25, 2010 at 0:29
4
votes
\$\begingroup\$

You could get an FPGA and mock up the whole thing on that -- no processor required.

I've been tempted to try and make a simple MIPS computer before. I've got a basic CPU design, but it would be difficult to say the least to wire-wrap or otherwise prototype out.

\$\endgroup\$
3
  • \$\begingroup\$ That's an interesting idea. Are there sources for reference processor designs that can be programmed into an FPGA? \$\endgroup\$
    – Barry Brown
    Aug 5, 2009 at 18:58
  • \$\begingroup\$ Most FPGA devkits come with either a free or licensed CPU design. Sometimes even with an accompanying RTOS. \$\endgroup\$
    – Martin Beckett
    Aug 5, 2009 at 19:01
  • \$\begingroup\$ A PDP-1 would be feasible. It's constructed from modular components. The logic diagrams for each component are published in the Digital Logic Handbook, 1969 (mine just came in the mail today!). \$\endgroup\$ Sep 13, 2011 at 5:44
2
votes
\$\begingroup\$

Check out Atmel's ATmega microcontrollers, they have all you ask for except the ability of executing code from RAM, and they are very easy to set up.

Some small 32 bit ARM processor such as ARM7TDMI would be an alternative, but these don't come in DIP packages. The same applies to Renesas R8C/M16C microcontrollers.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ +1 arduino.cc/playground/Learning/AtmegaStandalone \$\endgroup\$
    – kenny
    Aug 5, 2009 at 9:25
  • \$\begingroup\$ All of the AVRs use a read-only instruction space, don't they? I need to be able to execute out of RAM, so my programs can write programs. \$\endgroup\$
    – Barry Brown
    Aug 5, 2009 at 17:23
  • \$\begingroup\$ Yes, looks like you are right. Though when I played with Forth 25 years ago, I used a threaded code implementation, which would be possible with AVR. \$\endgroup\$
    – starblue
    Aug 5, 2009 at 17:43
  • \$\begingroup\$ An ARM Cortex M0 in a 28-pin DIP package has been sighted: nxp.com/products/microcontrollers/cortex_m0/lpc1100_x_l/… \$\endgroup\$
    – starblue
    Sep 17, 2012 at 13:17
2
votes
\$\begingroup\$

Sounds like a great project! I did one back in the 70's with an 8008 chip, and a little bit of RAM and ROM. I programmed it to play a little tune with speakers connected to the I/O port. Part of the memory circuit involved a timer chip controlled by a capacitor. I soldered on an extra capacitor that, when pushed into contact, made the whole thing slow down by 1000. Then I used in in class as a demonstrator. First I would run it slow and the students could hear the speakers going click, click. Then I unhooked the capacitor, and they heard the tune. I was trying to impress on them how computers finish one instruction before starting the next.

\$\endgroup\$
1
vote
\$\begingroup\$

Check out OLIMEX they have development boards for most modern micro controllers and if you really want DIP they have ARM processors on boards in DIP like format (1) . They also sell JTAGs and have some demo code available for most of the boards (gcc) so they are very easy to get up and running with. Most of their boards is available via Sparkfun. I personally like the Phillips LPC ARM based micros but anything from Olimex is good.

The AVR32 will also work for you (non havard). I have just recently started using them and was very surprised at how capable and easy to use they are.

To build from scratch is not really a option today unless you use an 8 bit dip micro or have a setup to solder surface mount boards and debug complex digital pc boards.

\$\endgroup\$
1
vote
\$\begingroup\$

Depending on your goals, you may want to consider building your own CPU with the features you want, instead of using an existing CPU. Check out the Homebuilt CPU webring. There's even a lunaticenthusiast who built a CPU from relays!

\$\endgroup\$
2
  • 1
    \$\begingroup\$ WOW! That's creepy! And he looks proud of it.... \$\endgroup\$
    – asp316
    Aug 14, 2009 at 17:42
  • \$\begingroup\$ It's a nice project. Alan Turing worked with relay-based hardware. This guys's relay stuff looks neatly assembled and built in nice cabinets. Good job! \$\endgroup\$
    – Kaz
    Apr 24, 2013 at 23:55
1
vote
\$\begingroup\$

Parallax Propeller

The only 32-bit processor currently being manufactured in a DIP package is the Parallax Propeller. (The same chip is also available in much smaller 44-Pin QFP and 44-Pin QFN packages, all with 32 general-purpose I/O pins). In addition to the Windows IDE, there's also a few development tools for it that run under Linux.

It appears to meet all your requirements except for "Built-in flash ROM" -- instead, the Propeller bootloads from an external 8-pin EEPROM. (That's one more thing to wire up, but it's much easier to wire up an 8-pin chip than most external program storage chips).

\$\endgroup\$
0
votes
\$\begingroup\$

+1 For the ATmega micros. You get them with a boot loader for programming via USB - making it even easier to get that first board running without needing to get a dedicated programmer. You will miss out on the ICE stuff if you go this route though.

\$\endgroup\$
0
votes
\$\begingroup\$

A second vote for the Amtel. I particularly like the teensy++ for prototypes and experimentation. The USB supplies power, provides a programming interface, and displays debug output. GNU dev tools. Tons of fun for about $30.

\$\endgroup\$
0
votes
\$\begingroup\$

Atmel is going to be quite popular, the arduinos (I like the pro models at sparkfun) themselves are popular. You will find MANY hobbyists out there that are familiar with and can answer most any question about using the AVR.

I prefer the msp430 instruction set to the avr, and the arm instruction set above the others. Olimex makes a number of "header" boards that are perfect for experiments. Luminary micro has some good ones but many of the pins are consumed by on chip show off the chip peripherals, good for learning the chip and features but you eventually want to cut them away to get at I/O. Anyway olimex is good, try http://www.sparkfun.com and browse through the development boards, some are from olimex some are from sparkfun, a wide selection and many under $40 or $50 so you can try a few to see what you like. I am about to order an armmite, which if it lives up to its feature list is probably the best controller board for my purposes.

\$\endgroup\$
0
votes
\$\begingroup\$

I've had the same dream, just never actually got around to it.

Most of the recommendations above are for dev boards. Since you said "from scratch" I'd assume you want to start with a single DIP processor chip and not buy a dev board. In which case I would very extremely super recommend you stick with something like the usual suspects you listed in your post. They are popular because they work well for such a task. You can overcome the need for more I/O lines with multiplexers and demultiplexers.

Suppose you did find that "perfect" CPU that does everything you want, and has the exact number of IO lines you want. You are not going to find anywhere near a smidgen of the support you'll find for the popular processors. You should very easily be able to find old used books on E-Bay, Amazon, etc. for just pennies that show how to design a complete system using those processors. Not to mention websites, compilers, and other people doing the same thing.

If you go with anything else, I think you're going to regret it deeply. You'll spend more time frustrated over lack of support than you would overcoming any technical issues you have with those processors. Plus, since people have already designed entire computers with those chips, you know it can be done. With anything else, there's always a chance you'll hit a brick wall.

\$\endgroup\$
1
  • \$\begingroup\$ Additionally, you might want to consider the option of copying an existing architecture like the C64 which has already been hacked to death. \$\endgroup\$
    – Greg Miller
    Aug 14, 2009 at 17:39
0
votes
\$\begingroup\$

Choose Atmel AVR. Here are some game platforms around it:

http://belogic.com/uzebox/index.asp
http://avga.prometheus4.com/
http://www.innovativedevice.com/console/GameStation.asp
http://www.lucidscience.com/pro-lazarus-64%20prototype-1.aspx
http://www.lucidscience.com/pro-vga%20video%20generator-1.aspx
\$\endgroup\$
0
votes
\$\begingroup\$

I prefer the msp430 instruction set to the avr, and the arm instruction set above the others.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.