Pinnacle Technologies
John W. MacConnell
john.macconnell@ieee.org
(509) 921-8016

July 4, 2000

=========================================================
First, the disclaimers:
     This program is provided without warranty.  You may use
     it, copy it and give it away as you like.  You may not
     alter it, or sell it.

=========================================================
Comments and suggestions:
     I welcome your comments and suggestions.  Please email
     them to me at the above listed email address.

=========================================================
OVERVIEW:

The program MAKEBOM.EXE takes the partlist output from
either an EAGLE schematic or board and generates a bill of
materials (BOM) using data from a user supplied database.

This database can contain additional information from what
is allowed in the EAGLE schematic, such as the vendor name,
the supplier, costs, etc.

The number of items (columns) that will be printed in the
BOM is pretty much up to the user, and is controlled by the
format of the database.

The program is command line driven.  While it looks like a
DOS program, it must be run under Windows 95 or Windows 98.
It can be run from a DOS window.  The program will accept
long file names.

A set of demonstration files is provided so that you can see
how the program functions.  More information about running
the demo is provided in the DEMO section below.
=========================================================
SETUP:

The zip file, MAKEBOM.ZIP contains  0README.TXT, a file
called PROGRAM.ZIP, and a file called DB_TOOLS.ZIP.

I would recommend that you do the following:
     Under the EAGLE subdirectory, make a subdirectory for
     the program, such as MAKEBOM.

     Copy the file MAKEBOM.ZIP into the subdirectory you
     just made, and unzip it.  You will then find the
     following files in the subdirectory:
          0README.TXT
          PROGRAM.ZIP
          DB_TOOLS.ZIP

          MAKEBOM.ZIP

     Unzip PROGRAM.ZIP.  You will then find the following
     files in the subdirectory:
          0README.TXT
          MAKEBOM.EXE
          DEMO.BAT
          DEMO.BRD
          DEMO.DB

          PROGRAM.ZIP
          DB_TOOLS.ZIP

     Under the MAKEBOM (or whatever you named it)
     subdirectory, make a subdirectory for the database
     tools, such as DB_TOOLS.

     Move the file DB_TOOLS.ZIP into the subdirectory from
     above and unzip it.  You will find the following files
     in the subdirectory:

          1README.TXT

          0MAKE_DB.BAT
          COLUMN.EXE
          JOINFILE.EXE

          0603IND.DB
          0603CAP.DB
          HEADER.DB
          NO_LOAD.DB
          RESISTOR.DB
          SEMI.DB
          TANTCAP.DB

          DB_TOOLS.ZIP

     These files and utilities can be used to generate a
     database.  For more information, please read the file
     1README.TXT in the DB_TOOLS (or whatever you named it)
     subdirectory.

=========================================================
PROGRAM OPERATION:

As mentioned above, the program MAKEBOM.EXE takes the
partlist output from either an EAGLE schematic or board and
generates a bill of materials (BOM) using data from a user
supplied database containing parts information.

The program is command line driven.  While it looks like a
DOS program, it must be run under Windows 95 or Windows 98.
It can be run from a DOS window.  The program will accept
long file names.

The calling format is:
     MAKEBOM input_file, output_file, database_file

Where:
     input_file is the name of the partlist file from an
     EAGLE board or schematic.

     output_file is the name of the BOM file name that will
     be generated.

     database_file is the name of the database file that is
     to be used in generating the BOM.

NOTES:
     The commas between file names MUST be present.

     Commas must not be used in file names.

     Spaces may be used in file names.

     Do not alter the format of the EAGLE partlist file.
     The program uses the format of this file to determine
     whether it is working with a file from a board or from
     a schematic.

     All matching instances of a part in the schematic that
     are found in the database are displayed in the BOM.
     That is, if you have, for example, a 1K resistor with a
     0603 package in the schematic, and three different 1K
     resistors with 0603 packages in the database, all three
     of the 1K resistors with 0603 packages in the database
     will be displayed in the BOM.

     When an item in the schematic cannot be located in the
     database, the value, package, and type are printed.
     All other columns are filled with ===============.

=========================================================
DEMO:

In the MAKEBOM subdirectory is a small script that
demonstrates the operation of the program.  To run it, just
run the batch file DEMO.BAT.

When the demo runs, it will create a file DEMO.BOM from the
EAGLE partlist file DEMO.BRD and the database file DEMO.DB.

The file DEMO.BOM can be viewed with a text editor.  It can
also be imported into a spreadsheet for further
modifications, if desired.
=========================================================
DATABASE:

The database is a "flat file".  Each part is on a line, with
the various fields separated by commas.  The following is an
example of one entry in the database.  It is for a 10K
resistor in a 0603 package.

10K,0603,res,TBD,Panasonic,ERJ-3GSYJ103V,Digikey,P10KGTR-ND,5K,$0.0045,0603 5% T&R

The columns (data fields) are defined by the header below,
and are as follows:

Value,Package,Part Type,In house PN,MFG,MFG PN,Distributor,Distributor PN,Quant,Price,Notes

Using the header file, it is possible to customize the
database and program output to suit your individual needs.

To better understand how a database looks, view DEMO.DB with
a text editor.
=========================================================
HEADER:

     Lines starting with ; are comments
     Spaces are allowed ahead of the ;

     Ref. Designator, Value, Package and Type are added by
     the program when it prints the BOM.  They are shown as
     comments in the header below for clarity only.  It is
     NOT a requirement that they be there.

     Each line in the header (with the exception of
     comments) has the format:
                     header_text, width

     Each line in the header formats a column in the final
     BOM.

     header_text is the text printed at the top of the
     column.

     width is the width of the column

     With the exception of the Ref. Designator (R1 or C2 for
     example), there must be an entry for each item shown in
     the header below in the data base.

     The following example of a header is used in the demo
     database.

start_header
;    Ref. Designator (added by program)
;    Value           (added by program)
;    Package         (added by program)
;    Type            (added by program)
     In-house PN, 15
     MFG, 15
     MFG PN, 15
     Distributor, 15
     Distributor PN, 15
     Quantity, 10
     Price, 10
     Notes, 28
end_header

=========================================================
DATA:

     Following the header is the data.  The start of the
     data is noted by the statement:

start_data

     All data base entries are separated by a ,

     Lines starting with ; are comments
     Spaces are allowed ahead of the ;

     The first three columns of the database are required to
     be:
          Value
          Package
          type

     The line below is an example of a part entry that meets
     the requirements specified by the header above.  The
     next line shows the contents of each data field.  These
     can be compared to the header above.

10pF,0603,cap,,Panasonic,ECJ-1VC2A100D,Digikey,PCC1941CT-ND,100,$0.12,0603 +/- 0.5pF NPO T&R

Value,Package,Part Type,In house PN,MFG,MFG PN,Distributor,Distributor PN,Quant,Price,Notes

NOTES:    There is no value given for the Ref Designator in
          data base entries, as can be seen in the example
          above.

          Part value, package and component type must appear
          in columns 1, 2 and 3 respectively.

          The Value and Package are compared to the values
          from the schematic when searching for a match.

          The component Type is used to determine if value
          equivalences (1000 = 1K = 0.1M for example) are
          allowed.  See the Value Equivalences section below
          for more information.  At present, three types are
          handled:
               cap for capacitors
               ind for inductors
               res for resistors

          For other types, the column is either:
               left blank, or
               assigned a type of the user's liking.

          The program ignores the user assigned types.

          For types other than cap, ind or res, the part
          value on the schematic must EXACTLY match that in
          the data base for a match to occur.

          Case is ignored (matches are not case sensitive)

==========================================================
VALUE EQUIVALENCES:

The program searches for equivalent values for the following
part types:
     cap
     ind
     res

For example, a capacitor showing 1nf in the database and
1000pf in the schematic will be recognized as equivalent.

The following equivalences are recognized:

For resistors (Type res):

     1.2K = 1K2 = m0012 = 0.0012M = 1200
     1.2M = 1M2 = 1200K = 1200000
     1.6  = 1R6 = 0K0016 = 0.0016K = 0M0000016 = 0.0000016M

For capacitors (Type cap):

     1200pf = 1.2nf = 1n2 = f0000000012 = 0.0000000012f
     4.7pf = 4p7 = n0047 = 0.0047nf = f0000000000047 = 0.0000000000047f

For inductors (Type ind):

     1.2nh = 1n2 = h0000000012 = 0.0000000012h
==========================================================
