View RSS Feed

mkl

Breakout board developing LC4128V tqfp100 cpld

Rate this Entry
Some BASIC to align leds:
10 rem in millimeters
20 pi=3.14159
50 centerx=1.600*25.4
60 centery=1.600*25.4
70 ledradius = 35.5
80 resradius = 39
90 print "grid mm;"
100 for i=0 to 63
110 angle = pi * (5/4 + (2*i/64))
120 x=cos(angle)*ledradius
130 y=sin(angle)*ledradius
140 print "move ";
142 gosub 700
145 print "LED";pnum$;
150 print " (";centerx+x;centery+y;");"
160 degrees=360*(angle/(2*pi))
170 degrees=degrees-90
171 rem led rotaation -90 degrees
180 gosub 800
190 print "rotate =R";deg$;" 'led";pnum$;"'"
200 rem do the resistors
210 angle = pi* (5/4 + (2*i/64))
220 x=cos(angle)*resradius
230 y=sin(angle)*resradius
240 print "move ";
242 gosub 700
245 print "R";pnum$;
250 print " (";centerx+x;centery+y;");"
260 degrees=360*(angle/(2*pi))-180
270 gosub 800
280 print "rotate =R";deg$;" 'R";pnum$;"'"
290 next i
298 system
299 end
700 if i+1<10 then digits=1 else digits=2
710 pnum$=right$(str$(i+1),digits)
720 return
800 rem
810 if degrees>360 then degrees=degrees-360
811 if degrees>360 then degrees=degrees-360
812 if degrees<0 then degrees=degrees+360
820 if degrees<10 then deg$=mid$(str$(degrees),2,4):return
830 if degrees<100 then deg$=mid$(str$(degrees),2,5):return
840 deg$=mid$(str$(degrees),2,6):return

On linux console (tail removes bwbasic copyright message from beginning)
bwbasic p.bas |tail -n 258 >l.scr

run the script in EAGLE board view

grid mm;
move LED1 ( 15.537626 15.5377925);
rotate =R135 'led1'
move R1 ( 13.062744 13.062927);
rotate =R45 'R1'
move LED2 ( 18.1189451 13.1982055);
rotate =R140.62 'led2'
move R2 ( 15.8985594 10.4926764);
rotate =R50.62 'R2'
etc...

Click image for larger version. 

Name:	lcbrk3brd.jpg 
Views:	42 
Size:	103.2 KB 
ID:	162621Click image for larger version. 

Name:	lcbrk3.png 
Views:	37 
Size:	89.4 KB 
ID:	162622
Tags: None Add / Edit Tags
Categories
Uncategorized

Comments