1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-16 19:01:53 +02:00

New circuit: an arbitrary-precision counter.

- BOOKSHELF: added the C8051F320 (alias "f320")
- BOOKSHELF: added "atrf" alias for AT86RF230
- BOOKSHELF: added "f326" alias for C8051F326
- AUTHORS, components/INFO, components/c8051f320.lib,
  components/c8051f320.dcm: added Silabs C8051F320
- AUTHORS, modules/INFO, modules/Makefile, modules/qfp.fpd: added LQFP32
  for C8051F320
- cntr/cntr.pro, cntr/cntr.sch, cntr/cntr.brd: arbitrary-precision counter
This commit is contained in:
Werner Almesberger 2010-08-22 21:32:54 -03:00
parent 2c29b5b22e
commit 5553d3e75b
11 changed files with 1896 additions and 1 deletions

View File

@ -11,9 +11,11 @@ Rene Harder <rehar@saweb.de>
Werner Almesberger <werner@openmoko.org> Werner Almesberger <werner@openmoko.org>
components/at86rf230.lib components/at86rf230.lib
components/c8051f320.lib
components/c8051f326.lib components/c8051f326.lib
modules/meander.fpd modules/meander.fpd
modules/pads.fpd modules/pads.fpd
modules/qfn.fpd modules/qfn.fpd
modules/qfp.fpd
modules/stdpass.fpd modules/stdpass.fpd
modules/xtal-4.fpg modules/xtal-4.fpg

View File

@ -9,12 +9,18 @@
N: at86rf230 N: at86rf230
A: transceiver A: transceiver
A: txrx A: txrx
A: atrf
D: http://www.atmel.com/dyn/resources/prod_documents/doc5131.pdf D: http://www.atmel.com/dyn/resources/prod_documents/doc5131.pdf
N: c8051f326 N: c8051f326
A: mcu A: mcu
A: f326
D: http://www.silabs.com/Support Documents/TechnicalDocs/C8051F326.pdf D: http://www.silabs.com/Support Documents/TechnicalDocs/C8051F326.pdf
N: c8051f320
A: f320
D: https://www.silabs.com/Support Documents/TechnicalDocs/C8051F32x.pdf
# AN043 -- Small Size 2.4 GHz PCB Antenna (Rev. D) # AN043 -- Small Size 2.4 GHz PCB Antenna (Rev. D)
N: AN043 N: AN043
A: antenna A: antenna

1175
cntr/cntr.brd Normal file

File diff suppressed because it is too large Load Diff

72
cntr/cntr.pro Normal file
View File

@ -0,0 +1,72 @@
update=Sun Aug 22 21:26:53 2010
last_client=pcbnew
[eeschema]
version=1
LibDir=
NetFmt=1
HPGLSpd=20
HPGLDm=15
HPGLNum=1
offX_A4=0
offY_A4=0
offX_A3=0
offY_A3=0
offX_A2=0
offY_A2=0
offX_A1=0
offY_A1=0
offX_A0=0
offY_A0=0
offX_A=0
offY_A=0
offX_B=0
offY_B=0
offX_C=0
offY_C=0
offX_D=0
offY_D=0
offX_E=0
offY_E=0
RptD_X=0
RptD_Y=100
RptLab=1
SimCmd=
UseNetN=0
LabSize=60
PrintMonochrome=1
ShowSheetReferenceAndTitleBlock=1
[eeschema/libraries]
LibName1=power
LibName2=device
LibName3=conn
LibName4=../components/c8051f320
LibName5=../components/mini_usb_b
[cvpcb]
version=1
NetIExt=net
[cvpcb/libraries]
EquName1=devcms
[pcbnew]
version=1
PadDrlX=320
PadDimH=600
PadDimV=600
BoardThickness=630
SgPcb45=1
TxtPcbV=800
TxtPcbH=600
TxtModV=600
TxtModH=600
TxtModW=120
VEgarde=100
DrawLar=150
EdgeLar=150
TxtLar=120
MSegLar=150
LastNetListRead=cntr.net
[pcbnew/libraries]
LibDir=
LibName1=../modules/mini-usb
LibName2=../modules/pads
LibName3=../modules/qfp
LibName4=../modules/stdpass

513
cntr/cntr.sch Normal file
View File

@ -0,0 +1,513 @@
EESchema Schematic File Version 2 date Sun Aug 22 21:08:12 2010
LIBS:power
LIBS:device
LIBS:conn
LIBS:c8051f320
LIBS:mini_usb_b
EELAYER 24 0
EELAYER END
$Descr A4 11700 8267
Sheet 1 1
Title ""
Date "23 aug 2010"
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
Wire Wire Line
8850 4000 8850 3800
Wire Wire Line
8850 3800 8650 3800
Connection ~ 9450 1650
Wire Wire Line
9450 1650 9450 1850
Wire Wire Line
3700 3050 3950 3050
Wire Wire Line
5850 3200 5000 3200
Wire Wire Line
9100 5700 9100 5900
Wire Wire Line
9200 4200 9200 4400
Wire Wire Line
9200 3100 9200 2900
Wire Wire Line
9200 2900 8650 2900
Wire Wire Line
9100 1850 9100 1650
Connection ~ 7800 1650
Wire Wire Line
7800 1650 7800 1850
Wire Wire Line
7650 1850 7650 1650
Wire Wire Line
7500 1850 7500 1650
Connection ~ 4950 3650
Wire Wire Line
4950 4200 4950 3650
Connection ~ 3950 3650
Wire Wire Line
5850 3050 5650 3050
Wire Wire Line
5300 6200 5300 5550
Wire Wire Line
5300 5550 5500 5550
Wire Wire Line
5500 5550 5500 6200
Wire Wire Line
6750 6200 6750 4650
Wire Wire Line
3950 4700 3950 4900
Wire Wire Line
3350 4700 3350 4900
Connection ~ 3650 3200
Wire Wire Line
3650 4200 3650 3200
Wire Wire Line
4550 4600 4550 4800
Wire Wire Line
5850 3500 4550 3500
Wire Wire Line
2500 3500 2700 3500
Connection ~ 1150 3200
Wire Wire Line
1350 3200 1150 3200
Wire Wire Line
1150 3650 1350 3650
Wire Wire Line
1350 3050 1150 3050
Wire Wire Line
1150 3500 1350 3500
Connection ~ 1150 3500
Wire Wire Line
1150 3050 1150 3850
Connection ~ 1150 3650
Wire Wire Line
2500 3650 2700 3650
Wire Wire Line
2700 3650 2700 3850
Wire Wire Line
2500 3200 4150 3200
Wire Wire Line
4950 4600 4950 4800
Wire Wire Line
3350 4200 3350 3350
Connection ~ 3350 3350
Wire Wire Line
3650 4700 3650 4900
Wire Wire Line
6900 4650 6900 6200
Wire Wire Line
5850 3350 4300 3350
Wire Wire Line
4300 3350 4150 3200
Wire Wire Line
2500 3350 4150 3350
Wire Wire Line
4150 3350 4300 3200
Wire Wire Line
3950 3050 3950 4200
Wire Wire Line
4550 3500 4550 4200
Wire Wire Line
5850 3800 5650 3800
Connection ~ 5650 3650
Wire Wire Line
5650 3650 5650 6200
Connection ~ 5650 3800
Wire Wire Line
7500 1650 8400 1650
Connection ~ 7650 1650
Wire Wire Line
9100 2350 9100 2750
Wire Wire Line
9100 2750 8650 2750
Wire Wire Line
8900 1650 10250 1650
Connection ~ 9100 1650
Wire Wire Line
9200 3600 9200 3800
Wire Wire Line
10050 2050 10050 1850
Wire Wire Line
10050 1850 10250 1850
Wire Wire Line
4300 3200 4500 3200
Wire Wire Line
2500 3050 3200 3050
Wire Wire Line
3950 3650 5850 3650
Wire Wire Line
9450 2550 9450 2350
$Comp
L GND #PWR01
U 1 1 4C71BB6C
P 8850 4000
F 0 "#PWR01" H 8850 4000 30 0001 C CNN
F 1 "GND" H 8850 3930 30 0001 C CNN
1 8850 4000
1 0 0 -1
$EndComp
$Comp
L GND #PWR02
U 1 1 4C71BAB2
P 9450 2550
F 0 "#PWR02" H 9450 2550 30 0001 C CNN
F 1 "GND" H 9450 2480 30 0001 C CNN
1 9450 2550
1 0 0 -1
$EndComp
$Comp
L VR VR4
U 1 1 4C71BA9B
P 9450 2100
F 0 "VR4" V 9530 2100 50 0000 C CNN
F 1 "5V6" V 9450 2100 50 0000 C CNN
F 2 "0603" H 9450 2100 60 0001 C CNN
1 9450 2100
-1 0 0 -1
$EndComp
$Comp
L R R4
U 1 1 4C71B3DC
P 4750 3200
F 0 "R4" V 4830 3200 50 0000 C CNN
F 1 "0" V 4750 3200 50 0000 C CNN
F 2 "0603" H 4750 3200 60 0001 C CNN
1 4750 3200
0 1 -1 0
$EndComp
$Comp
L R R5
U 1 1 4C71B3D9
P 3450 3050
F 0 "R5" V 3530 3050 50 0000 C CNN
F 1 "0" V 3450 3050 50 0000 C CNN
F 2 "0603" H 3450 3050 60 0001 C CNN
1 3450 3050
0 1 -1 0
$EndComp
$Comp
L GND #PWR03
U 1 1 4C71B2DD
P 9100 5900
F 0 "#PWR03" H 9100 5900 30 0001 C CNN
F 1 "GND" H 9100 5830 30 0001 C CNN
1 9100 5900
1 0 0 -1
$EndComp
$Comp
L PWR_FLAG #FLG04
U 1 1 4C71B2DB
P 9100 5700
F 0 "#FLG04" H 9100 5970 30 0001 C CNN
F 1 "PWR_FLAG" H 9100 5930 30 0000 C CNN
1 9100 5700
1 0 0 -1
$EndComp
Text Label 9750 1650 0 60 ~ 0
PROBE
$Comp
L GND #PWR05
U 1 1 4C71B1E2
P 10050 2050
F 0 "#PWR05" H 10050 2050 30 0001 C CNN
F 1 "GND" H 10050 1980 30 0001 C CNN
1 10050 2050
1 0 0 -1
$EndComp
NoConn ~ 7050 4650
NoConn ~ 7200 4650
NoConn ~ 7350 4650
NoConn ~ 7500 4650
NoConn ~ 7650 4650
NoConn ~ 7800 4650
NoConn ~ 8650 3650
NoConn ~ 8650 3500
NoConn ~ 8650 3350
NoConn ~ 8650 3200
NoConn ~ 8650 3050
$Comp
L CONN_1 P6
U 1 1 4C71B116
P 10400 1850
F 0 "P6" H 10480 1850 40 0000 L CNN
F 1 "CONN_1" H 10400 1905 30 0001 C CNN
F 2 "PAD_120x60" H 10400 1850 60 0001 C CNN
1 10400 1850
1 0 0 -1
$EndComp
$Comp
L CONN_1 P5
U 1 1 4C71B10C
P 10400 1650
F 0 "P5" H 10480 1650 40 0000 L CNN
F 1 "CONN_1" H 10400 1705 30 0001 C CNN
F 2 "PAD_120x60" H 10400 1650 60 0001 C CNN
1 10400 1650
1 0 0 -1
$EndComp
NoConn ~ 5850 2900
$Comp
L R R2
U 1 1 4C71B08A
P 9100 2100
F 0 "R2" V 9180 2100 50 0000 C CNN
F 1 "100k" V 9100 2100 50 0000 C CNN
F 2 "0603" H 9100 2100 60 0001 C CNN
1 9100 2100
-1 0 0 1
$EndComp
$Comp
L R R1
U 1 1 4C71B06B
P 8650 1650
F 0 "R1" V 8730 1650 50 0000 C CNN
F 1 "100k" V 8650 1650 50 0000 C CNN
F 2 "0603" H 8650 1650 60 0001 C CNN
1 8650 1650
0 -1 -1 0
$EndComp
NoConn ~ 7350 1850
NoConn ~ 6750 1850
NoConn ~ 6900 1850
NoConn ~ 7050 1850
NoConn ~ 7200 1850
NoConn ~ 5850 2750
$Comp
L C8051F320 U1
U 1 1 4C71AEC6
P 7250 3250
F 0 "U1" H 6250 4450 60 0000 C CNN
F 1 "C8051F320" H 7250 3250 60 0000 C CNN
F 2 "LQFP32" H 7250 3250 60 0001 C CNN
1 7250 3250
1 0 0 -1
$EndComp
Text Label 2700 3350 0 60 ~ 0
D+
Text Label 2700 3200 0 60 ~ 0
D-
$Comp
L GND #PWR06
U 1 1 4C6408C7
P 4550 4800
F 0 "#PWR06" H 4550 4800 30 0001 C CNN
F 1 "GND" H 4550 4730 30 0001 C CNN
1 4550 4800
1 0 0 -1
$EndComp
$Comp
L GND #PWR07
U 1 1 4C6408C5
P 4950 4800
F 0 "#PWR07" H 4950 4800 30 0001 C CNN
F 1 "GND" H 4950 4730 30 0001 C CNN
1 4950 4800
1 0 0 -1
$EndComp
$Comp
L GND #PWR08
U 1 1 4C6408BA
P 5650 3050
F 0 "#PWR08" H 5650 3050 30 0001 C CNN
F 1 "GND" H 5650 2980 30 0001 C CNN
1 5650 3050
0 1 1 0
$EndComp
$Comp
L GND #PWR09
U 1 1 4C6408AD
P 9200 4400
F 0 "#PWR09" H 9200 4400 30 0001 C CNN
F 1 "GND" H 9200 4330 30 0001 C CNN
1 9200 4400
1 0 0 -1
$EndComp
$Comp
L GND #PWR010
U 1 1 4C6408A3
P 5300 6200
F 0 "#PWR010" H 5300 6200 30 0001 C CNN
F 1 "GND" H 5300 6130 30 0001 C CNN
1 5300 6200
1 0 0 -1
$EndComp
$Comp
L GND #PWR011
U 1 1 4C64089F
P 2700 3850
F 0 "#PWR011" H 2700 3850 30 0001 C CNN
F 1 "GND" H 2700 3780 30 0001 C CNN
1 2700 3850
1 0 0 -1
$EndComp
$Comp
L GND #PWR012
U 1 1 4C640899
P 1150 3850
F 0 "#PWR012" H 1150 3850 30 0001 C CNN
F 1 "GND" H 1150 3780 30 0001 C CNN
1 1150 3850
1 0 0 -1
$EndComp
$Comp
L GND #PWR013
U 1 1 4C640896
P 3950 4900
F 0 "#PWR013" H 3950 4900 30 0001 C CNN
F 1 "GND" H 3950 4830 30 0001 C CNN
1 3950 4900
1 0 0 -1
$EndComp
$Comp
L GND #PWR014
U 1 1 4C64088F
P 3650 4900
F 0 "#PWR014" H 3650 4900 30 0001 C CNN
F 1 "GND" H 3650 4830 30 0001 C CNN
1 3650 4900
1 0 0 -1
$EndComp
$Comp
L GND #PWR015
U 1 1 4C64088A
P 3350 4900
F 0 "#PWR015" H 3350 4900 30 0001 C CNN
F 1 "GND" H 3350 4830 30 0001 C CNN
1 3350 4900
1 0 0 -1
$EndComp
Text Label 5500 6000 1 60 ~ 0
GND
Text Label 6900 6000 1 60 ~ 0
C2D
Text Label 5650 6000 1 60 ~ 0
VBUS
Text Label 6750 6000 1 60 ~ 0
C2CK
$Comp
L VR VR3
U 1 1 4C64034D
P 3950 4450
F 0 "VR3" V 4030 4450 50 0000 C CNN
F 1 "5V6" V 3950 4450 50 0000 C CNN
F 2 "0603" H 3950 4450 60 0001 C CNN
1 3950 4450
-1 0 0 -1
$EndComp
$Comp
L VR VR2
U 1 1 4C640343
P 3650 4450
F 0 "VR2" V 3730 4450 50 0000 C CNN
F 1 "5V6" V 3650 4450 50 0000 C CNN
F 2 "0603" H 3650 4450 60 0001 C CNN
1 3650 4450
-1 0 0 -1
$EndComp
$Comp
L VR VR1
U 1 1 4C6402FB
P 3350 4450
F 0 "VR1" V 3430 4450 50 0000 C CNN
F 1 "5V6" V 3350 4450 50 0000 C CNN
F 2 "0603" H 3350 4450 60 0001 C CNN
1 3350 4450
-1 0 0 -1
$EndComp
$Comp
L R R3
U 1 1 4C6402F2
P 9200 3350
F 0 "R3" V 9280 3350 50 0000 C CNN
F 1 "68" V 9200 3350 50 0000 C CNN
F 2 "0603" H 9200 3350 60 0001 C CNN
1 9200 3350
-1 0 0 -1
$EndComp
$Comp
L LED D1
U 1 1 4C6402EE
P 9200 4000
F 0 "D1" H 9200 4100 50 0000 C CNN
F 1 "LTST-C190KTKR" H 9200 3900 50 0000 C CNN
F 2 "0603" H 9200 4000 60 0001 C CNN
1 9200 4000
0 -1 1 0
$EndComp
$Comp
L CONN_1 P1
U 1 1 4C640203
P 5500 6350
F 0 "P1" H 5580 6350 40 0000 L CNN
F 1 "CONN_1" H 5500 6405 30 0001 C CNN
F 2 "PAD_120x60" H 5500 6350 60 0001 C CNN
1 5500 6350
0 1 1 0
$EndComp
$Comp
L CONN_1 P4
U 1 1 4C640202
P 6900 6350
F 0 "P4" H 6980 6350 40 0000 L CNN
F 1 "CONN_1" H 6900 6405 30 0001 C CNN
F 2 "PAD_120x60" H 6900 6350 60 0001 C CNN
1 6900 6350
0 1 1 0
$EndComp
$Comp
L CONN_1 P3
U 1 1 4C640200
P 6750 6350
F 0 "P3" H 6830 6350 40 0000 L CNN
F 1 "CONN_1" H 6750 6405 30 0001 C CNN
F 2 "PAD_120x60" H 6750 6350 60 0001 C CNN
1 6750 6350
0 1 1 0
$EndComp
$Comp
L CONN_1 P2
U 1 1 4C6401FE
P 5650 6350
F 0 "P2" H 5730 6350 40 0000 L CNN
F 1 "CONN_1" H 5650 6405 30 0001 C CNN
F 2 "PAD_120x60" H 5650 6350 60 0001 C CNN
1 5650 6350
0 1 1 0
$EndComp
$Comp
L C C1
U 1 1 4C6401B3
P 4550 4400
F 0 "C1" H 4600 4500 50 0000 L CNN
F 1 "100nF" H 4600 4300 50 0000 L CNN
F 2 "0603" H 4550 4400 60 0001 C CNN
1 4550 4400
1 0 0 -1
$EndComp
$Comp
L C C2
U 1 1 4C6401AA
P 4950 4400
F 0 "C2" H 5000 4500 50 0000 L CNN
F 1 "1uF" H 5000 4300 50 0000 L CNN
F 2 "0603" H 4950 4400 60 0001 C CNN
1 4950 4400
1 0 0 -1
$EndComp
NoConn ~ 2700 3500
$Comp
L MINI_USB_B CON1
U 1 1 4C609C5C
P 1900 3350
F 0 "CON1" H 1900 3850 60 0000 C CNN
F 1 "MINI_USB_B" H 1900 2850 60 0000 C CNN
F 2 "miniUSB_B" H 1900 3350 60 0001 C CNN
1 1900 3350
-1 0 0 -1
$EndComp
$EndSCHEMATC

View File

@ -6,6 +6,9 @@
# N Data sheet identifier (N tag of BOOKSHELF; can be omitted if equal to S) # N Data sheet identifier (N tag of BOOKSHELF; can be omitted if equal to S)
# #
# C8051F320 MCU
S: c8051f320
# C8051F326 MCU # C8051F326 MCU
S: c8051f326 S: c8051f326

3
components/c8051f320.dcm Normal file
View File

@ -0,0 +1,3 @@
EESchema-DOCLIB Version 2.0 Date: Sun Aug 22 19:43:37 2010
#
#End Doc Library

45
components/c8051f320.lib Normal file
View File

@ -0,0 +1,45 @@
EESchema-LIBRARY Version 2.3 Date: Sun Aug 22 19:43:37 2010
#
# C8051F320
#
DEF C8051F320 U 0 40 Y Y 1 F N
F0 "U" -1000 1200 60 H V C CNN
F1 "C8051F320" 0 0 60 H V C CNN
DRAW
S -1100 1100 1100 -1100 0 1 0 N
X P0.1/MISO 1 -1400 500 300 R 50 50 1 1 T
X P0.0/SCK 2 -1400 350 300 R 50 50 1 1 T
X GND 3 -1400 200 300 R 50 50 1 1 W
X D+ 4 -1400 50 300 R 50 50 1 1 B
X D- 5 -1400 -100 300 R 50 50 1 1 B
X VDD 6 -1400 -250 300 R 50 50 1 1 w
X REGIN 7 -1400 -400 300 R 50 50 1 1 W
X VBUS 8 -1400 -550 300 R 50 50 1 1 w
X nRST/C2CK 9 -500 -1400 300 U 50 50 1 1 I
X P3.0/C2D 10 -350 -1400 300 U 50 50 1 1 T
X P1.6 20 1400 -100 300 L 50 50 1 1 T
X P0.4/TX0 30 -200 1400 300 D 50 50 1 1 T
X P2.7 11 -200 -1400 300 U 50 50 1 1 T
X P1.5 21 1400 50 300 L 50 50 1 1 T
X P0.3/nSS 31 -350 1400 300 D 50 50 1 1 T
X P2.6 12 -50 -1400 300 U 50 50 1 1 T
X P1.4 22 1400 200 300 L 50 50 1 1 T
X P0.2/MOSI 32 -500 1400 300 D 50 50 1 1 T
X P2.5 13 100 -1400 300 U 50 50 1 1 T
X P1.3 23 1400 350 300 L 50 50 1 1 T
X P2.4 14 250 -1400 300 U 50 50 1 1 T
X P1.2 24 1400 500 300 L 50 50 1 1 T
X P2.3 15 400 -1400 300 U 50 50 1 1 T
X P1.1 25 550 1400 300 D 50 50 1 1 T
X P2.2 16 550 -1400 300 U 50 50 1 1 T
X P1.0 26 400 1400 300 D 50 50 1 1 T
X P2.1 17 1400 -550 300 L 50 50 1 1 T
X P0.7 27 250 1400 300 D 50 50 1 1 T
X P2.0 18 1400 -400 300 L 50 50 1 1 T
X P0.6 28 100 1400 300 D 50 50 1 1 T
X P1.7 19 1400 -250 300 L 50 50 1 1 T
X P0.5/RX0 29 -50 1400 300 D 50 50 1 1 T
ENDDRAW
ENDDEF
#
#End Library

View File

@ -37,6 +37,9 @@ F: qfn
# #
N: sot617-3-lp N: sot617-3-lp
# "Generic" simple QFP (for now, just for Silabs' C8051F320)
F: qfp
# Common 4-pin crystal SMT package (pins 1 and 4 are on a short side, pin # Common 4-pin crystal SMT package (pins 1 and 4 are on a short side, pin
# numbering is counter-clockwise) # numbering is counter-clockwise)
F: xtal-4 F: xtal-4

View File

@ -1,4 +1,4 @@
MODULES=meander mini-usb pads qfn stdpass xtal-4 MODULES=meander mini-usb pads qfn qfp stdpass xtal-4
.SUFFIXES: .fpd .mod .SUFFIXES: .fpd .mod
.PHONY: all clean .PHONY: all clean

73
modules/qfp.fpd Normal file
View File

@ -0,0 +1,73 @@
/* MACHINE-GENERATED ! */
frame pad {
set px = (dx*X1+dy*Y1)/2
set py = (dy*X1+dx*Y1)/2
set pin = side*pins/4+i+1
__0: vec @(px, py)
__1: vec @(-px, -py)
pad "$pin" __0 .
}
frame side {
set pos = i-(pins/4-1)/2
loop i = 0, pins/4-1
__0: vec @(e*pos*dx, e*pos*dy)
frame pad .
}
frame pads {
table
{ side, dx, dy }
{ 0, 0, -1 }
{ 1, 1, 0 }
{ 2, 0, 1 }
{ 3, -1, 0 }
__0: vec @(dy*C1/2, -dx*C2/2)
frame side .
}
frame index {
}
frame outline {
set mx = D1/2
set my = E1/2
set cf = 0.8
set rf = (1-cf)/2
set r = mx*rf
__0: vec @(mx, my)
__1: vec @(-mx, -my)
rect . __0 w
__2: vec @(-mx*cf, my*cf)
__3: vec .(0mm, r)
circ __2 . w
}
package "$name"
unit mm
table
{ name, pins, X1, Y1, e, C1, C2, D1, E1 }
{ "LQFP32", 32, 0.55mm, 1.3mm, 0.8mm, 8.45mm, 8.45mm, 7mm, 7mm }
set X2 = X1+(pins/4-1)*E
set Y2 = X2
set w = 5mil
frame pads @
frame outline @
measy pad.__1 -> pad.__0 1mm