EESchema appendix: Library files format EESchema
Headings:
Sizes and coordinates are given in mils (1/1000 inch)
format:
EESchema-LIBRARY Version 2.0 24/1/1997-18:9:6
description of the components
# End Library
The format is as follows :
DEF name reference unused text_offset draw_pinnumber draw_pinname unit_count units_locked option_flag
ALIAS name1 name2…
fields list
DRAW
list graphic elements and pins
ENDDRAW
ENDDEF
Parameters for DEF :
name = component name in library (74LS02 ...)
référence = Reference ( U, R, IC .., which become U3, U8, R1, R45, IC4...)
unused = 0 (reserved)
text_offset = offset for pin name position
draw_pinnumber = Y (display pin number) ou N (do not display pin number).
draw_pinname = Y (display pin name) ou N (do not display pin name).
unit_count = Number of part ( or section) in a component package.
units_locked = = L (units are not identical and cannot be swapped) or F (units are identical and therefore can be swapped) (Used only if unit_count > 1)
option_flag = N (normal) or P (component type "power")
Example:
DEF BNC P 0 40 Y NR 1 L NR
F0 “P” 10.120 60 H V L C
F1 “BNC” 110 - 60 40 V V L C
DRAW
C 0 0 70 0 1 0
C 0 0 20 0 1 0
X Ext. 2 0 - 200 130 U 40 40 1 1 P
X In 1 - 150 0.130 R 40 40 1 1 P
ENDDRAW
ENDDEF
This line exists only if the component has alias names.
format:
ALIAS name1 name2 name3…
format:
F n “text” posx posy dimension orientation visibility hjustify vjustify
with:
n = field number :
reference = 0.
value = 1.
Pcb FootPrint = 2.
Diagram name = 3. At present time: not used (reserved)
n = 4..11 = fields 1 to 8.
orientation = H (horizontal) or V (vertical).
Visibility = V (visible) or I (invisible)
hjustify vjustify = L R C B ou T
L= left
R = Right
C = center
B = bottom
T = Top
Example:
DEF DIODE D 0 40 Y NR 1 0 NR
F0 “D” 0.100 50 H V L C
F1 “DIODE” 0 - 100 50 H V L C
There are of 5 types:
Polygon (succession of segments), filled or normal.
Rectangle.
Circle.
Arc of circle.
Text.
Format:
P Nb parts convert ltrait x0 y0 x1 y1 xi yi DC
With:
Nb = a number of points.
unit = 0 if common to the parts; if not, number of part (1. .n).
convert = 0 if common to the 2 representations, if not 1 or 2.
trait = line thickness (always 0).
xi yi coordinates of end i.
DC = F if polygon is filled; if not, nothing.
Example:
P 3 0 1 0 - 50 50 50 0 - 50 - 50 F
P 2 0 1 0 50 50 50 - 50
Format:
S startx starty endx endy unit convert ltrait
With
unit = 0 if common to the parts; if not, number of part (1. .n).
convert = 0 if common to the representations; if not, 1 or 2.
ltrait = thickness (always 0).
Example:
S 0 50.900.900 0 1 0
Format:
C posx posy radius unit convert ltrait
With
unit = 0 if common to the parts; if not, number of part (1. .n).
convert = 0 so common to the representations, if not 1 or 2.
ltrait = thickness (always 0).
Example:
C 0 0 70 0 1 0
C 0 0 20 0 1 0
Format:
With posx posy radius start end part convert ltrait start_pointX start_pointY end_pointX end_pointY
With:
start = angle of the starting point (in 0,1 degrees).
end = angle of the end point (in 0,1 degrees).
unit = 0 so common to the parts; if not, number of part (1. .n).
convert = 0 if common to the representations, if not 1 or 2.
ltrait = thickness (always 0).
start_pointX start_pointY = coord of the starting point (role similar to start)
end_pointX end_pointY = coord of the point of arrival (role similar to end)
Example:
To 0.148 48 - 889 889 0 1 0
To 0 51 51 - 889 889 0 1 0
Format:
T orientation posx posy dimension unit convert Text
With:
orientation = horizontal orientation (=0) or vertical (=1).
type = always 0.
unit = 0 so common to the parts, if not number of part (1. .n).
convert = 0 if common to the representations, if not 1 or 2.
Example:
T 0 - 320 - 10 100 0 0 1 VREF
Format:
X name number posx posy lenght orientation Snum Snom unit convert Etype [shape].
With:
orientation = U (up) D (down) R (right) L (left).
name = name (without space) of the pin. if ~: no name
number = n pin number (4 characters maximum).
length = pin length.
Snum = pin number text size.
Snom = pin name text size.
unit = 0 if common to the parts; if not, number of part (1. .n).
convert = 0 so common to the representations, if not 1 or 2.
Etype = electric type (1 character)
shape = if present: pin shape (clock, inversion…).
Example:
X TO 1 - 200 0.150 R 40 40 1 1 P
X K 2.200 0.150 L 40 40 1 1 P
X 0 1 0 0 0 R 40 40 1 1 W NR
X ~ 2 0 - 250 200 U 40 40 1 1 P
Page 3 -
-