HomePACESearch
ProjectsForumsSite Map

Current:
Level Down:

Getting Started


So you're taking ECE 345, and you have a project that could benifit from a microcontroller, but you don't know where to begin, right?

This is the place to start.

First, you need to decide which microcontroller is right for your project.

Some things to consider before choosing a microprocesor.
  • Speed
  • Cost
  • External Interfaces (TTL, Serial, Parrallel)
  • Application (Signal Processing, Computation, etc)

Brief Overview of the Processors Available


This FAQ will focus on the following controllers:
Product Manufacturer Application Primary Features
Basic Stamp (and friends) Parallax Inc. General Purpose Simple to Wire/Program
BasicX (and friends) Netmedia Inc. General Purpose Simple, Faster than Basic Stamp
MC68HC912B32 Motorola General Purpose Much Faster than Basic Stamps, also much more complicated
XSA-100 FPGA Xess Corporation FPGA Logic (VHDL) Some common interfaces (PS2, VGA), also VERY FAST
TMS320C54x Texas Instruments Digital Signal Processing Real Time sampling, limited external interfacing

Selection Guide

Major Features

Language Compiler Program Loader Ram Size Ram Expandable? Flash/EEPROM Program Location ATD/DTA Multitasking Timers PWM IO Technology MAX Prog Size Speed
BasicX BASIC BasicX 2.00 BasicX 2.00 400 Bytes No 32K/none Flash Yes Yes Yes (RTC) Yes TTL 8000 lines ~8000 lines/sec
HC12 ASM/C MiniIDE
CodeWarior
miniIDE
Any term prog
1Kb Yes 32K/768 Bytes Ram (initially)
Flash or EEPROM
Yes No Yes Yes CMOS Varies 8MHz
FPGA VHDL Xilinx ISE XSTools 16M No No CPLD Memory No No No (You can make one though) No TTL Compatible DEPENDS1 Wire speed (100MHz external clock)
TI DSP ASM/C/C++ CodeComposer,
Command Line Tools
CodeComposer 32k Internal
32k External
No No Ram Yes,
No Digital Out
No Yes No N/A VARIES2 80MHz
1. Program size is limited by the number of gates to which your program complies.
2. If you use ASM, you can fit more lines of code. I've put 1000 lines of C on it with no problems. Timing becmose the largest issue with large programs.

Basic Stamp

We're not going to cover this processor much, simply because during our research, we found that it is entirely obsoleted by the BasicX, which is faster and pin-compatible. The only advantage the Basic Stamp has is an industrial version with a slightly wider operating tempurature range than the BasicX. Parallax also makes a neat Javelin Stamp, which is programmed using a Subset of Java, as well as a Basic Stamp in a small 14-pin SIP package. If you intend to use one of Parallax's products, you're on your own.

BasicX (And Friends)

Netmedia makes 3 versions of the BasicX, all of which are a little different. Since we only have the BX-24 available, this is the one we are going to focus on, but most of the documentation you'll find here will probably apply to the others. All of Netmedia's products feature their Multitasking Operating System, and can interface with most standard TTL logic devices.

BasicX-1
The BasicX-1 is a neat little processor, and has a few features that the BX-24 doesn't. It may be worth considering if you need the features, but in its base configuration, its a little lacking. The BX-1 goes for $40 on Netmedia's Site, and comes in a 40-pin PDIP package. One of the main features of this processor that you will find useful is the RS-485 networking that allows you to network the multiple chips--it's also fast enough to share memory between chips, but the documentation on it is sketchy at best.

Configuration
Feature Base Configuration Expandable
I/O Pins 32 Digital Liminted to 28 when using
external EEPROM
Analog I/O Pins None N/A
EEPROM (Program Storage) 512 Bytes (~256 lines of code) 32KB (~8000 lines) with external SPI EEPROM
RAM 256 Bytes 128KB with Ram Sandwich (Requires Development Board)
(64K Variables, 64K Extended Memory)
Ram Sandwich: $30
Development Kit: $140

If you decide to use the processor, keep in mind that you will have very limited program size, no analog inputs, and that it is programmed via parallel port only. Also, the development software is not compatable with Windows 2000 (and probably XP).

BasicX-24
This is the processor we have to work with, so if we say that something works on this, it doesn't mean that it will work on any of the other models. The BX-24 comes standard with 32kb EEPROM, 400 Bytes of Ram for variables, 16 I/O lines, 8 of which can be used for A/D or D/A interfacing, but it's not expandable. It also has a couple of fun LED's on the board, but it doesn't support the Networking that the BX-1 does. If you decide to use a Basic product, this is the one you are probably going to go with. It sells for $50 on Netmedia's site, but if you shop around, you can find it for less than $45. There is a minimal development board that really isn't worth the money that includes one computer, a serial cable, a CD of docs and example programs, and a power-supply for $100.

Configuration:
Feature Configuration
RAM 400 Bytes
EEPROM 32kB - Program Storage ~8000 Lines
Flash Memory 480 Bytes - Persistent Variables
Power Requirements 5.0 VDC @ 25mA OR 5.7-15 VDC @ 100mA
Digital IO 16 Pins, TTL Compatible
Analog IO 8 Pins
Serial Communications Up to 460,800bps, out any digital Pin


BasicX-35
This is a low-cost version of the BX-24 that has a few more IO lines, but needs an external Atmel 25256 32Kb EEPROM. If we have time, we'll put some more up on this.

Motorola HC12

Motorola's 68HC912B32 is really a neat little chip, although the development board is a little feature limited (we plan to change this). Getting started is a little problematic, and using it and programming it has a pretty steep learning curve, especially if you've never programmed in assembly before. There is a C compiler made by a fantastic company called Metrowerks, that should be installed on the 345 machines, but you don't have a whole lot of room on this chip for programs, so you're better off working in assembly. In its base setup, it has several ports for Gereral Purpose IO, and some other ports that can also be used for general purpose IO (39 pins in total, but don't quote me, I'm writing this from memory), 8 Analog-Digital channels, and a fair amount of space for program storage. The hardware portion of our project consisted of designing an expanded memory version of this, but there are a few things that have to be addressed. Mostly, you loose the bulk of your GPIO ports, but they can be emulated externally, which we hope to incorporate in our design--more on this later. The chip runs at 8MHz, and is pipelined, but it doesn't execute instructions simultaneously. Instead, one instruction moves through the entire pipeline before a second instruction enters it. You have 1KB of on chip ram to play with and prototype your programs, then the programs can be written to flash to keep the program resident when the board looses power. There is a little program called Debug-12 in flash that lets you do a lot of stuff--poorly, that you have to write over, and you are also stuck using this entirely inferior serial boot-loader program that also resides in flash. Also, this chip is a CMOS cpu, so all of your inputs/output need to be CMOS compatible. See the datasheets for the CD4050B if you want to connect HC12 outputs to TTL inputs. If you want to connect TTL outputs to HC12 inputs, you can pull this off with a 10K pull-up resistor at the HC12 input. All in all, a nice little CPU, but the packaging and the interface make it a little bit of a pain to work with.

XESS XSV-300 FPGA

There's not really a whole lot to say about this board. First of all, the only board we could get our hands on is the XSA-100, a much more basic version than the XSV-300 they claim to have. The main points of this board are its speed and interfaces, but you have to learn VHDL, which is a little difficult (and we're not going to teach you). In case you don't know, VHDL is a quasi-compiled high-level language based on ADA? where you define digital logic gates and how they are connected. This board has a 100MHz clock that can be divided (50MHz, 25MHz), and approaches near wire-speed for gating that doesn't involve the clock, but you can't really write "software" for it. It has some SDRAM on it that we NEVER got to work, a PS2 port, and a VGA port; which are really the useful stuff. If you wanted a user interface to a PS2 keyboard, you would have to build the interface for any of the other microcontrollers. It's also TTL compatible.

TI 320C54x DSP

This microprocessor is a basic DSP chip. You can do many simple DSP functions with and it is very robust and flexible in the DSP thing you can do with it. Things such as filtering, Sound and video effects, speech coding, or various other communication projects. This board after it is set up is great to use and won't give you much a problem. However manually setting up the DSP board is not recommended as will be explained in the documentation. If your project requires you to just DSP, this is the microprocessor for you.

Making your selection

As far as which processor you are going to use, this is largely a function of the application. The BasicX is cheap and easy to use, but not very fast. The HC12 is faster, but considerably more complicated. If you need near wire-speed, as well as the extra interfaces, the FPGA board is the board for you, but it's rather expensive. If you're going to do anything with real-time DSP, you should use the TI DSP, but they are in limited supply, VERY EXPENSIVE, and have few external interfaces to the outside world.

Here's an overview and selection guide...

MCU Pros Cons Other Issues
BasicX Simple to Wire
Simple to program
TTL Compatible
HUGE Function Library
Programs in Flash (Saved after power-failure)
Variables in flash
Multitasking
Rather Slow
Small Ram Size
Limited IO Pins
People look at you funny whey you program in BASIC
Motorola HC12 Fairly Fast
Many Digital IO Pins
Memory can be expanded
C Compiler
Poor Programming Interface
Programs get erased if power fails
Expanding memory is tough
CMOS Compaitlble
XSA-100 FPGA FAST
16MB SDRAM on board
PS2 Keyboard Port
VGA Port
Great Simulator Available
Great Development Environment
Difficult to program well
Limited Debugging Support
The software is harder to learn than the programming language
A little hard to get one
TI 32054x DSP Really Fast
Real Time DSP
DSP type instructions (circular buffers,etc)
C Compiler
Limited External Interfaces (serial, 2 signal IN, 6 Signal Out) Even harder to get one that works

This document created by:
CJ Oster and Joe Ngai

Last Modified: April 05, 2003
Please contact Professor Gary Swenson (swenson1@uiuc.edu) to learn more about the course, or contact the webmaster (wiegert@uiuc.edu) with questions or comments about the web site.  Web Site designed by Purvesh Thakker.