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 PAULMON Monitor Version 1 Original Docs 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

Introduction to PAULMON 1.0 (Very Old Documentation)


Administrators Note: Paulmon 2.0 is going to be released soon so it would not be wise to use 1.0 in any new boards since using 2.0 will have many advantages over 1.0. If you are intrested in beta testing the new version, please contact Paul via E-Mail paul@ece.orst.edu to get on the mailing list
The PAULMON debugger is my attempt to make a user-friendly 8051 debugger, with enough on-line information that it should be unnecessary to read this doc file. PAULMOM is targeted for use by the microprocessor design course at Oregon State, but may be used by anyone (who can figure it out) for projects ranging from research to commercial products. PAULMON is free and may not be distributed for profit whatsoever.

Since I don't expect Prof's or TA's at OSU to make students aware of this documentation nor to provide it nor do I expect students to read much of it, I wrote PAULMON to be very simple and to provide lots of on-line clues about what it can do and how to go about it. I hope that you find PAULMON to be useful and easy to use. Good Luck.

-Paul Stoffregen (paul@ece.orst.edu)

DISCLAIMER: This is free software. As far as warranty is concerned, you get exactly what you pay for! I have tried to make this code as good as possible during the four weeks I worked on it, but nobody is perfect and portions (the single step in particular) were never well tested. USE AT YOUR OWN RISK. The assembly source is provided in case there's something you don't like.

ADDITIONAL DISCLAIMER: This doc file has lots of tyopes and other errorss, and I really don't care. PAULMON was written to be easy enough that this file ought to be unnecessary, but people ask for it nonetheless, usually before they even try to use the thing.

What You Will Need to use it:

PAULMON is 8051 assembly code which is intended to be burned into a 2764 EPROM, though a pair of 2732's could be used or a bigger rom can be used with the rest being empty or filled with other code. The EPROM with PAULMON should be addressed so that it is read from 0000 to 1FFF with the 8051's EA pin wired to make it read all code from external memory.

The compiled version is availible along with the source code on the ECE web site. PAULMON uses the built in UART in the 8051 to communicate with the user. Typically, a PC computer is used with a terminal program, an 8051 assembler, and a text editor to form a simple, low cost 8051 development system with PAULMON. A serial line receiver and driver should be used (the MAX232 is a good choice, IMHO) to interface the 8051 to the PC's serial port. Only TxD, RxD and ground are used (no handshaking) and PAULMON adapts to use whatever baud rate the computer is using (if it can with the crystal you select, see below)

PAULMON is intended to be used with RAM as well, and the default location for the beginning of the RAM is 2000 (hex), right after the EPROM, though the RAM can be used anywhere in the range of 2000 - FFFF. The read enable signal to the RAM should be the logical OR of the RD and PSEN signals, so that read attempts to external code memory or program memory spaces will read from the RAM. (use an AND gate to do the logical OR of these signals, since they are active low!) Obviously the write enable of the RAM should be connected to the WR pin of the 8051.

Having a RAM connected in this way will allow the download command in PAULMON to write your program into the RAM (writing into the external data memory space). Then you can run your program, since read attempts from the external program memory space will read from the RAM chip.

How to get is set up:

Design and build your 8051 board. All that is really required is the 8051, an EPROM, a latch (74xx373), some sort of address decoding to enable the EPROM for memory access between 0000-1FFF, and a line receiver to convert the high voltage RS232 to a TTL (or CMOS) compatible signal (or else you'll toast the 8051 before it even has a chance).

To really use PAULMON, a RAM is required as well as the AND gate to allow both program and data read cycles to read the RAM memory, and a reset button to easily get back to PAULMON when your program crashes.

With just the minimal setup, set the computer's baud rate to something slow (like 1200 bps) and power up the board. Press Enter (Return) and hopefully you'll see a screenful of text from PAULMON. PAULMON does not send line feed characters, so the terminal emulator software must be configured to translate CR -> CR/LF. (PAULMON ignores LF characters is receives.) If the entire message ends up on one line, then the terminal is not translating CR -> CR/LF. After it works, you can try increasing the baud rate and COLD-BOOTING (you must turn the power off, taking the reset line high will not make PAULMON look for the new baud rate... or change the bytes where it stores the old baud rate... see the code if you're interested) If the minimal system shows no signs of life, it's time to check the wiring, usually starting by making sure you didn't swap the TxD and RxD lines.

The Automatic Baud Rate detection:

This code was borrowed from MDP/51 by Kei-Yong Khoo. It is run immediatly after a system reset. It waits for a <RETURN> character, and uses it to calculate the timer #1 reload value. Some modifications have been made to Khoo's code. It requires only one character. It also stores the reload value in four memory locations in internal ram (78H, 79H, 7AH, and 7BH). These four locations are unlikely to be changed during a user program's execution or while the debugger is running. When another reset occurs (without removing the power) the program looks at those four locations. If all four agree, then it uses that reload value and does not require another keypress. It is interesting to note that occasionally, with cystal values which produce exact reload values (such an 7.3728 MHz), the baud rate detection routine may not correctly calculate the reload value. Garbage will get printed all over the screen. If this happens, just switch off the power and try again. The advantage of crystals such as the 7.3728 Mhz is that they allow transmission at speeds of 9600 and 19200 baud! It is highly reccomended that you use the highest possible baud rate with this debugger, as is tends to print quite a bit of text to the screen.

The Commands


Return to 8051 page