PJRC.COM Offline Archive, February 07, 2004
Visit this page on the live site

skip navigational linksPJRC
Shopping Cart Checkout Shipping Cost Download Website
Home MP3 Player 8051 Tools All Projects PJRC Store Site Map
You are here: 8051 Tools Development Board Construction Search PJRC

PJRC Store
8051 Dev Board, $79
LCD 20x2 Display, $11
Serial Cable, $5
12 Volt Power, $8
More Components...
8051 Tools
Main Page
Software
PAULMON Monitor
Development Board
Code Library
89C2051 Programmer
Other Resources

Construction And Testing

When building the 8051 development board with manual hand soldering, the shortest parts should be soldered before taller parts. This allows the parts to easily be kept still and pressed against the board, which is the best condition for hand soldering.

If you purchased the unassembled kit, the parts will come packaged into bags the correspond to these suggested assembly steps.

Step #1: Resistors, Capacitors and Crystal

The resistors should be soldered first, followed by the diode and finally the crystal. The diode is polarity sensitive and must be installed with the strip facing the 10K resistor, as shown in figure 1.

assembly step 1 diagram
Figure 1: Step 1 - Low Profile Parts: Resistors, Diode and Crystal

QuantityColorDescription
8YellowResistor, 820, 5%, 1/4W (Gray, Red, Brown, Gold)
1BlueResistor, 1K, 5%, 1/4W (Brown, Black, Red, Gold)
1RedResistor, 3.3K, 5%, 1/4W (Orange, Orange, Red, Gold)
1BrownResistor, 10K, 5%, 1/4W (Brown, Black, Orange, Gold)
1GreenResistor, 1M, 5%, 1/4W (Brown, Black, Green, Gold)
1PurpleDiode, Schottkey, 1N5819
1OrangeCrystal, 22.1184 MHz, HC49/SU, Parallel 20pF
Table 1: Parts List for Step 1

Step #2: Capacitors (short) and Resistor Network

Next, the small capacitors should be soldered. These should be mounted close to the board. The legs may need to be trimmed shorter before soldering, or only a few soldred at a time.

When soldering the 330 ohm resistor network, pin 1 must be aligned as shown in figure 2. Care should also be taken to verify that it is at approximately a 90 degree angle to the board, which is easiest to check and fix after only one of the six pins is soldered. If the resistor network is crooked, it can prevent placement of the 14 pin DIP sockets in step 3.

assembly step 1 diagram
Figure 2: Step 2 - Short Parts: Capacitors and Resistor Network

QuantityColorDescription
15YellowCapacitor, 0.1µF
2OrangeCapacitor, 22pF
1BlueResistor Network, 330 Ohm, 6 Pin Bussed
Table 2: Parts List for Step 2

Step #3: DIP Sockets

If the capacitors were soldered flush in step 2, you should be able to mate the DIP sockets flush to the board when it is upside-down. While DIP sockets can function soldered in either orientation, the have a notch on one side to mark the orientation of their chips. Orient the sockets as shown in figure 3.

assembly step 1 diagram
Figure 3: Step 3 - DIP Sockets

QuantityColorDescription
4RedSocket, DIP-14
2BlueSocket, DIP-16
1GreenSocket, DIP-20
1YellowSocket, DIP-28
Table 3: Parts List for Step 3

Step #4: LEDs, Header, LCD Socket, PLCC Sockets

Finally, in step 4 the board is nearly finished. The LEDs should be soldered first. The LEDs are polarity sensitive and will not light if they are installed backwards. Also, it is a good idea to solder just one leg and visually check the LED for proper alignment. Crooked LEDs, while perfectly functional, will give the entire board a sloppily constructed appearance, whereas nicely aligned and straight LEDs will give your construction a professional appearance.

Likewise, the 4 pin header and 14 pin LCD socket should be checked carefully for proper alignment (easiest with 1 pin soldered).

The PLCC sockets must be oriented correctly, with their corner notches facing in the directions shown in figure 4. It can be very difficult to desolder a PLCC socket without damage to the board, so the orientation of these sockets should be doubled checked!

assembly step 1 diagram
Figure 4: Step 4 - Medium Height Parts: PLCC Sockets, LEDs, Header, Socket, Trip Pot

QuantityColorDescription
2RedLED, T-1, Red, Low Current Ultra Bright
1GreenLED, T-1, Green
8OrangeLED, T-1 3/4, Red, Low Current Ultra Bright
1CyanHeader, 4 pin, 0.1 Inch Spacing
1PurpleSocket, 2x7, 0.1 Inch Spacing
1BrownTrim POT, 2k, 1 Turn
1PeachSocket, PLCC-32
3YellowSocket, PLCC-44
Table 4: Parts List for Step 4

Step #5: Connectors, Capacitors (tall), and Pushbutton

Finally, the tallest parts are soldered. The electrolytic capacitors are polarity sensitive and must be aligned as shown. Care should be taken to get the DC power jack aligned well, as a crooked jack will be very visibly apparant when the power cord hangs off the board at the wrong angle. The pushbutton and two 9 pin D-Sub connectors should be soldered last, because they feature spring loaded pins which hold the part firmly to the board during soldering.

assembly step 1 diagram
Figure 5: Step 5 - Tall Parts: Connectors, Pushbutton, Electrolytic Capacitors

QuantityColorDescription
4OrangeCapacitor, 10µF
1RedPushbutton, Momentary Contact, 6 mm, 4 or 5 Pin
1BlueConnector, Terminal Block, 2 Conductor, 5.08 mm
1GreenConnector, DC Power Jack, 2.1 mm Post, 5.5 mm Diameter
2YellowConnector, D-Sub 9 Pin Socket (Female), PCB Right Angle
Table 5: Parts List for Step 5

Step #6: Voltage Regulator and Heatsink

The last part to solder is the voltage regulator. The pins must be bent at a 90 degree angle. Place the regulator near the board and visually line up the tab's hole to the mating hole on the board. This will allow you to mark the place where the legs must be bent. Bending in the correct location will allow the part to be inserted easily.

If heatsink grease is available, a thin layer should be placed between the voltage regulator and heatsink to facilitate heat transfer. During normal operation, there is very little heating, but the heatsink allows the five volt power to be used for peripheral circuits you may later add in the prototype construction area, or for a LCD backlight.

The screw and nut should be used to secure the voltage regulator and heatsink to the board, so it remains still during soldering. Because to the thermal dissipation of the TO-220 package, a larger soldering iron tip should be used for better heat transfer.

assembly step 1 diagram
Figure 6: Step 6 - Voltage Regulator and Heatsink Assembly

QuantityColorDescription
1RedIC, LM7805, Voltage Regulator, +5 Volts, TO-220 with Heatsink and Hardware
1YellowHeatsink
1BlueScrew, 4-40 Thread
1GreenNut, 4-40 Thread
Table 6: Parts List for Step 6

Step #7: Install Chips Into Sockets

Now that all the parts are soldered, all the remains is to insert all the chips into their sockets. The 87C52 chip must be programmed with the PAULMON2 monitor program (PM21_2F4.HEX). If you purchased the unassembled kit or purchased a pre-programmed chip from PJRC, then this step has already been done. If you purchased a blank chip elsewhere, you must use an EPROM programmer to write the PM21_2F4.HEX file into it.

DIP package parts are usually manufactured with their pins at a slight angle, so these will need to be straightened to fit into the sockets. All chips are polarity sensitive and must be inserted in the correct orientation.

assembly step 1 diagram
Figure 7: Step 7 - Install Chip Into Sockets

QuantityColorDescription
1RedIC, MAX232, RS-232 Interface, +5 Volt
1BlueIC, 74HC00, Quad NAND Gate
1YellowIC, 74HC02, Quad NOR Gate
1GreenIC, 74AC08, Quad AND Gate
1PeachIC, 74AC20, Dual 4-input NAND Gate
1LimeIC, 74HC138, Decoder, 3 to 8, Active Low
1BrownIC, 74HC373, Octal D Flip-Flop
1PurpleIC, 87C52, Microcontroller (program with PM21_2F4.HEX)
1LavenderIC, 62256, SRAM, 32Kx8
1CyanIC, SST39SF512, Flash ROM
2OrangeIC, 82C55, Programmable Peripheral Interface
Table 7: Parts List for Step 7

Completed Board

After all of the components are added, the board should appear similar to this:
finished board
Now you are ready to try the board for the first time.

Applying Power For the First Time

Use a current limited power supply when applying power to the board for the first time. By limiting the current, incorrectly inserted chips or other parts may survive. But without current limiting, the likelyhood of permanent damage to incorrectly installed parts is much higher.

If a fancy "lab bench" power supply with built-in current limiting is not available, a good alternative is to connect a 47 to 100 ohm resistor in series with the positive lead of a +12 volt power supply. For example, if the board is shorted (one of the 74HCxx chips inserted backwards), a 100 ohm resistor will limit the current from 12 volts to only 120 mA. Keep in mind that the unregulated AC power adaptors that are rated for 12 volts will usually output higher voltage with light loading. 16 to 18 volts is common. A resistor of at least 100 ohms should be used in series with one of those power adaptors because of the higher output voltage.

The board should consume between 30 mA to 50 mA of current when no LCD is installed, no serial cable is connected, and only the green PWR LED is on. Monitor the current, either by connecting an amp meter in series, or by watching the current display on your power supply (if it has one), or by connecting a voltmeter accross the series resistor (if you are using a resistor to limit the current). If you observe excessive current, shut the power off immediately.

If you see zero current, the power may be connected in the wrong polarity, or the 1N5819 diode may be installed backwards or not soldered properly. Also check the 7805 voltage regulator connection.

As a final check before proceeding, measure the +5 volt power line on the board to verify that the 7805 voltage regulator is producing the proper +5 volt power for all the other chips on the board.

First Communication With The Serial Port

Turn off power to the board, and 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.

Apply power to the board again, after the terminal emulation program is running and has its baud rate and other settings established.

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. We suggest you select 115200 or 57600.

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).

Testing The RAM

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.


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