still a lot of power in the BASIC Stamp I, as Ernie proves with his new
project on how to:
Troubleshoot your PC with
the aid of the BASIC Stamp I Rev D
By: Ernie Negus
Project Designer: Ernie
Project Files: port80.zip
File Size: 316K
Email the designer at: email@example.com
This project requires access to an EPROM burner to program the code definitions. The program that creates the EPROM image requires Microsoft Windows 95 or better. The schematics for this project can be found in the zip file as "Schemos.gif".
This project decodes the port 80 diagnostic port common to nearly all PCs and displays the last component tested, in
English, should the computer hang on power up self test (POST). This information can be used by technicians to diagnose and repair a faulty motherboard. As is, this project allows you to select one of four BIOS code definitions, from the data burned into an EPROM. A Visual Basic 6 Program, Port80.exe is provided to allow you to create an EPROM image for the 27512 based on what the four available POST code definition sets you want from a list of 74 supported
BIOS. In addition this program allows you to use your own BIOS definitions that you can create using any text editor.
There are two circuits in the project. The first circuit is the LCD driver/EPROM display data source with a 14 pin female connector for connecting to a 2 x 40 character LCD display (with a Hitachi compatible controller) and a 16 pin male IDC header for connecting the display to a Unisys compatible motherboard with a port 80 diagnostic port connector already on it. Many server motherboards based on the Intel Chipsets have this port available, and these motherboards are expensive enough to warrant repairing them rather than replacing them when they go faulty. This port is a 16 pin header (sometimes it is not stuffed with stake pins). The display circuit is attached to this port via an IDC cable with female 16 pin IDC connectors at both ends. The Unisys layout of this port prevents the board and LCD driver circuit from becoming damaged should the 16 pin connectors be inserted incorrectly. If all the boards you intend to work on already have this port on it, there is no need to build the second circuit.
If you do not have a port 80 connector on your mother board, you will need to build the ISA
circuit (#2) as well. This circuit decodes the address lines of the ISA bus and will latch the data lines whenever there is a write to the Port 80 Diagnostic port. The first circuit plugs into the second circuit much the same way as it would if the port 80 header was available on the motherboard. I attached a 9V battery clip temporarily to pin 1 and ground of the stamp and brought out the three pin parallel interface to program the stamp in the circuit.
Bill of materials for circuit #1:
One Prototype Circuit Board Approx.1.5" x 3.5" (Part of Jameco PCB1 or Fry's #1632974)
One Basic Stamp 1 for driving the LCD display (Jameco Prod #BS1-IC)
One 2 Line by 40 Character LCD display (Jameco Prod #DMC50037N)
One 74HCT04 Hex inverter (Available at Radio Shack)
One 74C374 Transparent latch (Jameco Prod #74C374 or Radio shack #276-2881)
One 74HCT157 or 74HCT257 Data Selector (Radio Shack #276-2835)
One 27C512 EPROM (See note below) (Jameco Prod #27C512-25)
One 32 Pin socket for above EPROM. (Good quality - I suggest machine tooled pins)
One CD4040 or 74HCT4040 12 Bit Ripple counter (Jameco Prod #CD4040)
One 10K, 50K or 100K Pot (for LCD contrast).
Six 10K resistors. (See design notes!)
One DIP or binary switch
One 14 Pin IDC female header for the LCD display - like Jameco part #70720 (needs trimming)
One 14 Pin IDC Male header for LCD Display (to replace its cable) - like Jameco part #118455
One 16 Pin IDC male header for port 80 connector. - like Jameco part #68179
One 16 Pin IDC Female to 16 Pin IDC Female flat cable
One Enclosure. 8" long if you trim LCD board (Radio Shack #270-1808)
One Optional 9 pin sub-D female connector (for serial output)
Bill of materials for circuit #2:
One ISA Protyping board (Jameco Prod #JE417)
One 74LS10 three input NAND gates. (Jameco Prod #74LS10)
Two CD4048 or CD4078 8-input NOR gates. (Jameco Prod #CD4078)
One 4.7K pull-up. Optional- for making the port Unisys compatble.
One 16 Pin IDC male header. (Jameco Part #68179)
Two Optional Hex LEDs to make card standalone too (Jameco Part #32951)
Circuit and BS1 Stamp operation:
The Port 80 code itself selects a bank of 64 bytes directly on the EPROM address lines. The switches select which of the four 16 Kbyte banks to use. The Basic Stamp 1 program advances the 7 bit address counter connected to the EPROM to cycle through 64 bytes of read only memory. The Stamp gets the data from the EPROM one nibble at a time via the 74C157 data selector. It then displays the character on the LCD display, advances the counter to the next location in the EPROM and loops to get another character. If the same code is displayed for more than three seconds, all 64 characters are then displayed. Clearing the display will automatically clear the counter via the RS line and inverter. The AB line doubles as a serial
output. The two digit POST code is sent out via this line at 2400 baud, 8 bits, no parity. If the BIOS takes an unexpected branch, you can see this by comparing the output generated by a defective board against one produced by a gold reference board. The program for the Basic Stamp is found in the zip file as
You might have to play with the values of the four 10K resistors between the stamp IO pins and the '257. The 10K should work fine, but I was forced to use 4.7K resistors in one of the prototypes I built. The 10K resistors in this one instance did not allow enough pull-down current for the lows to be seen as lows by the stamp. I prefer using CMOS parts for simple slow circuits, but there is no reason you can't use LS or S parts instead. The only difference between a '157 and a '257 is that the '257 offers tri-state outputs. This is defeated in the circuit so either chip can be used. The CD4048 was used in the ISA circuit because I happened to have many around, but they are no longer in production. The CD4078 is a drop in replacement with additional functionality (also has an "OR" output). The 74LS10 can be swapped with any logic that performs a three input NAND fucntion. The pinouts will be different, of course.
If you want, you can use a smaller EPROM such as a 27128 or 27256. Just omit the extra switch(es) and select only the first one or two BIOS sets in the included VB6 program, Port80.exe, to generate the proper EPROM image. For the EPROM socket, I used a 32 Pin socket instead of 28 pins, ignoring the four topmost pins ie; pin 1 actually starts at pin 3 of the socket, pin 16 of the socket is really pin 14 and pin 30 of the socket is really pin 28. I did this to allow for upgradability- I can use a 271001 or a 272001 instead of the 27512 to add more post data sets without too much circuit board redesign. For the same reason, I used a four-switch dipswitch instead of a two-switch one.
If you use the Jameco circuit board, you'll need to trim off some of the board behind the connector to get it to fit in 16 bit ISA slots. If you use an Optrex 2 line display, you might have to trim 1/4 to 1/2 inches of extra board at both ends and drill some mounting holes to get it to fit in the Radio Shack case. As seen in the schematics, you can add two TIL311 LED displays to use the ISA ciruit as a standard POST card. You won't get anything except the two digit POST code when it is used alone, of course, but it could come in handy in a pinch.
Port80.exe (Visual Basic 6 program):
This program requires the Visual Basic 6 runtime package to be installed before it can be used. At the time of this writing it was available from Microsoft at the following URL:
Port80.exe can be run directly from the zip file by double clicking it from Winzip. If you want to add your own custom codes, unzip it to a directory and place a text file "postdata.txt" in the same directory before running Port80.exe. In order to work with Port80.exe, this file should:
Use no blank lines.
Start with a description of the first BIOS. The third character should NOT be a space in this description.
Following this, each on its own line, place each 2 digit post code, in hexadecimal, followed by at least one space and the description of the code ie; make sure the third character IS a space for each post code description.
Once all Post codes and descriptions for that BIOs are entered, Place the next BIOS description on the next line, insuring that the third character is not a space. Repeat steps 3 and 4 until all BIOs descriptions and Post code descriptions are entered.
You will need to be sure your postdata.txt file is in the same directory before running Port80.exe for it to see the file. You will also need to select the "postdata.txt" option from the data source frame after running the program.
An example postdata.txt file is included in the zip file.
If you know what chip numbers are being utilized by each power on test on a certain board, you can place these component locations in the description instead. In this way, you get a handy list of the chips that could possibly be causing the problem on that particular motherboard.
Tip #2: You do not need to enter the Post codes in any particular order. As long as they are placed under the BIOS definition, they will work.
Tip #3: Be careful when entering the hexadecimal digits in the Post Code definitions. If one of the characters is not 0-9 or A-F, that digit will be determined by the program as a zero.
Tip #4: Make sure your post codes and definitions are 64 characters or less. Any extra characters get truncated and will not get displayed. However, all characters get displayed in a window when you choose to List the Post Codes.
Tip #5: Save the image in Binary mode if you can. If your EPROM burner only supports Hex file formats, select Intel HEX format instead.
Tip #6: Select a BIOs, using the combo list boxes, for each of the four banks if using a 27x512. Select a Bios for the first two if using a 27x256 and only the first one for a 27x128.
Tip #7: It takes a while to build the ROM image. A red line will appear just under the title bar on the form. When this line gets to the rightmost edge, it's finished.
Most of the POST code information was obtained through the following website:
Eric's BIOS Post Codes: http://www.webenet.net/~ntuser/
Thanks to Eric for making this valuable information available.
If you have questions or do not have access to an EPROM burner, but would still like to build this project, here is my email address:
Thanks for sharing your project
with everyone Ernie. Great job....;o]