skip navigational linksPJRC
Shopping Cart Download Website
Home Products Teensy Blog Forum
You are here: 8051 Tools Development Board Old Versions Rev 4 (2002) Construction

PJRC Store
8051 Board, $79
LCD 128x64 Pixel, $29
LCD 16x2 Char, $14
Serial Cable, $5
9 Volt Power, $6
More Components...
8051 Tools
Main Page
Software
PAULMON Monitor
Development Board
Code Library
89C2051 Programmer
Other Resources

Construction And Testing

The 8051 development board can be constructed in two steps. First all of the parts required for a minimal system to boot and communicate via the serial port are added. This allows the board to be tested before the remaining parts are added in the second step.

Step #1: Minimal Hardware To Boot

The first step requires five chips and most of the passive components. This first step does not require a large number of solder connections, and it will allow you to work out the details of communication with the board before it contains many more parts.

The diode, electrolytic capacitors, and ICs are polarity sensitive and must be inserted ash shown in Figure 1. Shorter components (resistors and the diode) should be soldered before the taller components are inserted. Table 1 lists reasonable order for the assembly of step #1.

step1 diagram
Figure 1: Component Placement for Step 1 (Minimal System)

QuantityColorDescription
1BlueResistor, 10k, 5%, 1/4W (Brown, Black, Orange, Gold)
1GreenResistor, 1k, 5%, 1/4W (Brown, Black, Red, Gold)
1PurpleResistor, 1M, 5%, 1/4W (Brown, Black, Green, Gold)
1RedDiode, Schottkey, 1N5819
1Steel BlueCrystal, 22.1184 MHz, HC49/SU, Parallel 20pF
2OrangeCapacitor, 22pF
5YellowCapacitor, 0.1µF
1PeachIC, LM7805, Voltage Regulator, +5 Volts, TO-220 with Heatsink and Hardware
8BrownCapacitor, 10µF, 35V
1GrayPushbutton, Momentary Contact, 6 mm, 4 or 5 Pin
1CyanConnector, Terminal Block, 2 Conductor, 5.08 mm
1LavenderIC, MAX232, RS-232 Interface, +5 Volt, and DIP-16 Socket
1LavenderIC, 74HC00, Quad NAND Gate, and DIP-14 Socket
1LavenderIC, 74HC02, Quad NOR Gate, and DIP-14 Socket
1LavenderIC, 74AC08, Quad AND Gate, and DIP-14 Socket
1LavenderIC, 87C52, Microcontroller (program with PM21_2F4.HEX), and PLCC-44 Socket
1LimeConnector, D-Sub 9 Pin Socket (Female), PCB Right Angle
Table 1: Parts List for Step 1 (in approximate order for easiest assembly)

The 87C52 processor must be programmed with "PM21_2F4.HEX". If you purchased the unassembled kit or a preprogrammed chip from PJRC, then the code is already written. If your chip is blank, you will need to buy or borrow an EPROM programmer which is capable of writing to the 87C52.

If you are using your own components (rather than an unassembled kit from PJRC), many of the components may be substituted with similar parts if you do not have the exact values. The crystal may be any frequency from 4 to 24 MHz, though certain values such as 11.0592 or 22.1184 MHz will allow high speed baud rates and are therefore preferable. The 87C52 oscillator is uses the crystal in "parallel resonance" mode, but a "series" type crystal may be substituted with a small error in the actual frequency (perhaps important to know for some timing-critical applications). Resistor values and the 10 µF capacitors are not critical and similar parts may be substituted (e.g a 4.7 µF capacitor should work).

Testing Step #1

Connect the serial port to a COM port on a standard PC computer and run a terminal emulation program program. The using the board for the first time page shows step-by-step instructions for setting up and using Hyperterminal (which is included with Microsoft Windows). Initially, you should select a slow baud rate, such as 2400 baud. Other settings are 8 data bits, no parity, 1 stop bit, no flow control.

Connect a five volt power supply to the board. The voltage must be between 4.5 to 5.5. The 12 volt input on the board is not required, and it's a good idea to leave it unconnected until it is needed.

Once the terminal program is running, turn on the power to the board. One or two random characters may appear on the computer's terminal window as the power is turned on. PAULMON2 waits for you to send a carriage return character after the power is turned on (so it can detect your baud rate setting). Press Enter and you should receive the PAULMON2 welcome message:

               Welcome to PAULMON2 v2.1, by Paul Stoffregen

  See PAULMON2.DOC, PAULMON2.EQU and PAULMON2.HDR for more information.   


Program Name                     Location      Type
  List                             1000      External command
  Single-Step                      1400      External command
  Memory Editor (VT100)            1800      External command

PAULMON2 Loc:2000 >

If you did not receive this welcome message you pressed Enter, then it's time to start troubleshooting.

You will probably want to use the board at a faster baud rate. If you are using the 22.1184 MHz crystal supplied by PJRC, then you can use 115200 baud, and all other standard baud rates down to 1200 baud (300 baud is too slow for the 8051's timer1 with a 22.1184 MHz crystal). If you are using a different crystal, particularly on that is not chosen to allow high speed baud rates, your maximum baud rate will be much slower.

PAULMON2 stores the current baud rate information in the 8051's volatile internal RAM, so that it can skip the baud rate detection (waiting for you to press Enter) if the baud rate is already known. The downside to this is that you must remove power for a long enough time that the 8051's internal memory is cleared. Usually 5-10 seconds is enough time. When you restart from the power removed, PAULMON2 will wait for Enter to detect the baud rate. You must completely remove power each time you change the baud rate on the PC, so that PAULMON2 doesn't reboot and use the old baud rate while your PC is set to the new one (resulting in lots of "garbage" characters on the screen).

When you're ready to begin soldering again, proceed to the next step where you will gain the ability to download your own programs to the board and run them.

Step #2: Memory and Peripherals

In the second step, the RAM, Flash ROM, Peripherals and related chips are added. The RAM provides space for program variables and is usually used to download programs during the development process. The Flash ROM provides non-volatile storage for your program, when you wish to make the board dedicated to your application (instead of running PAULMON2). Two 82C55 chips provide many additional I/O lines and allow you to control 8 LEDs. The 74HC373 chip is needed for the 87C52's address bus, and the 74AC20 and 74HC138 chips provide address decoding to allow all these bus-interfaced devices to be accessed according to the memory map.

The LEDs are polarized and will not function if they are installed incorrectly. Each LED has a flat side, which is aligned with the edge of the board. As before, all of the chips are polarity sensitive and must be installed as shown in figure 2.

step2 diagram
Figure 2: Component Placement for Step 2 (Memory and Peripherals)

QuantityColorDescription
8BlueResistor, 820, 5%, 1/4W (Gray, Red, Brown, Gold)
1OrangeResistor, 3.3k, 5%, 1/4W (Orange, Orange, Red, Gold)
8RedLED, T-1 3/4, Red, Low Current Ultra Bright
6YellowCapacitor, 0.1µF
1GreenTrim POT, 2k, 1 Turn
1PurpleSocket, 2x7, 0.1 Inch Spacing
1CyanHeader, 4 pin, 0.1 Inch Spacing
1LavenderIC, 74AC20, Dual 4-input NAND Gate, and DIP-14 Socket
1LavenderIC, 74HC138, Decoder, 3 to 8, Active Low, and DIP-16 Socket
1LavenderIC, 74HC373, Octal D Flip-Flop, and DIP-20 Socket
1LavenderIC, 62256, SRAM, 32Kx8, and DIP-28 Socket
1LavenderIC, SST39SF512, Flash ROM, and PLCC-32 Socket
2LavenderIC, 82C55, Programmable Peripheral Interface, and PLCC-44 Socket
1LimeConnector, D-Sub 9 Pin Socket (Female), PCB Right Angle
Table 2: Parts List for Step 2 (in approximate order for easiest assembly)

Testing Step #2

To test the RAM, download the Banner Example Program. From the PAULMON2 menu, press "D" to begin the download. PAULMON2 will respond Begin ascii transfer of Intel hex file, or ESC to abort. Then you must send the ex1_2.obj file to PAULMON2. Most terminal emulation programs call this ASCII Upload or some similar name. Hyperterminal uses "Send Text File..." in the "Transfer" menu. The text that appears on the screen should look like this:

PAULMON2 Loc:2000 > Download

Begin ascii transfer of Intel hex file, or ESC to abort

.................................
Download completed

Summary:
 33  lines received
 505  bytes received
 505  bytes written
No errors detected

In most cases where the RAM is not working properly, an error about "Unable to write" should appear. Other types of errors, such as checksums, unexpected hex digits, etc usually indicate problems with the download process. If you do get any errors or the download process doesn't appear as shown above, go to the troubleshooting page.

In this example, EX1_2.OBJ was used. The other files are assembled at 4000 and 8000, which will use another part of the RAM or the Flash ROM. If you wish to try these, you will need to select their address to jump to them, instead of 2000 as shown.

Once the program has downloaded successfully, you can run it with the JUMP command (press "J"). The memory location to jump to should be 2000, and it will probably be the default location.

The EX1_2.OBJ program will prompt you to enter a string. Here is an example when "PAULMON" is typed:

Please type a word (9 char max): PAULMON


######      #     ##   ##  ##       ##   ##   #####   ##   ##  
#######    ###    ##   ##  ##       ### ###  #######  ###  ##  
##   ##    ###    ##   ##  ##       #######  ##   ##  ###  ##  
##   ##   ## ##   ##   ##  ##       ## # ##  ##   ##  #### ##  
#######   ## ##   ##   ##  ##       ## # ##  ##   ##  ## # ##  
######    #####   ##   ##  ##       ##   ##  ##   ##  ## ####  
##       #######  ##   ##  ##       ##   ##  ##   ##  ##  ###  
##       ##   ##  #######  #######  ##   ##  #######  ##   ##  
##       ##   ##   #####   #######  ##   ##   #####   ##   ##  


Press any key

If this message appears only briefly and then the system restarts, it is probably a sign that your terminal emulation software is configured to send CR/LF when you press Enter. If this is the case, it should be set to only send CR (ascii code 13).

At this point, you can download programs to your board. You may want to try writing a few simple programs, perhaps by copying and pasting bit of code from the EX1.ASM program. This program, like PAULMON and the examples in the code library, is in the public domain, so you can use whatever parts you find useful in your own programs. It may also be helpful to look over the PAULMON2 Documentation.

The 82C55 chips and LEDs can be tested using the LED Blink example code, which is also available in C instead of assembly. These pages also illustrate the usage of the assembler and C compiler, which should get you started toward writing your own application using these languages.

Completed Board

After all of the components are added, the board should appear similar to this:
finished board


8051 Development System Circuit Board, Paul Stoffregen
http://www.pjrc.com/tech/8051/board4/construct.html
Last updated: February 24, 2005
Status: work in progress
Buy a bare board or preprogrammed processor
Suggestions, comments, criticisms: <paul@pjrc.com>