diff --git a/python/pcb.py b/python/pcb.py index 334398b5ed70936afa9e11306bdf42486ec0ab43..1b9efe6825e70c55d477ca411632ca5cc9361cd9 100755 --- a/python/pcb.py +++ b/python/pcb.py @@ -1116,7 +1116,6 @@ class SJ(part): # discretes ############################################################ - class ST4EB(part): # # Nidec Copal ST4ETB103 trimpot @@ -6463,6 +6462,105 @@ class VL53L1X(part): # ICs ############################################################ +class XIAO(part): + # + # XIAO + # + def __init__(self,value=''): + self.value = value + self.pad = [point(0,0,0)] + self.labels = [] + padl = cube(-0.03,0.081,-0.070/2,0.070/2,0,0) + padr = cube(-0.081,0.03,-0.070/2,0.070/2,0,0) + width = 0.713 + pitch = 0.1 + offset = 0.08 + dx = 0.035 + # + # pin 1 + # + self.shape = translate(padl,-width/2,3*pitch,0) + self.pad.append(point(-width/2,3*pitch,0)) + self.labels.append(self.text(self.pad[-1].x+dx,self.pad[-1].y,self.pad[-1].z,'D0')) + # + # pin 2 + # + self.shape = add(self.shape,translate(padl,-width/2,2*pitch,0)) + self.pad.append(point(-width/2,2*pitch,0)) + self.labels.append(self.text(self.pad[-1].x+dx,self.pad[-1].y,self.pad[-1].z,'D1')) + # + # pin 3 + # + self.shape = add(self.shape,translate(padl,-width/2,1*pitch,0)) + self.pad.append(point(-width/2,1*pitch,0)) + self.labels.append(self.text(self.pad[-1].x+dx,self.pad[-1].y,self.pad[-1].z,'D2')) + # + # pin 4 + # + self.shape = add(self.shape,translate(padl,-width/2,0*pitch,0)) + self.pad.append(point(-width/2,0*pitch,0)) + self.labels.append(self.text(self.pad[-1].x+dx,self.pad[-1].y,self.pad[-1].z,'D3')) + # + # pin 5 + # + self.shape = add(self.shape,translate(padl,-width/2,-1*pitch,0)) + self.pad.append(point(-width/2,-1*pitch,0)) + self.labels.append(self.text(self.pad[-1].x+dx,self.pad[-1].y,self.pad[-1].z,'SDA')) + # + # pin 6 + # + self.shape = add(self.shape,translate(padl,-width/2,-2*pitch,0)) + self.pad.append(point(-width/2,-2*pitch,0)) + self.labels.append(self.text(self.pad[-1].x+dx,self.pad[-1].y,self.pad[-1].z,'SCL')) + # + # pin 7 + # + self.shape = add(self.shape,translate(padl,-width/2,-3*pitch,0)) + self.pad.append(point(-width/2,-3*pitch,0)) + self.labels.append(self.text(self.pad[-1].x+dx,self.pad[-1].y,self.pad[-1].z,'TX')) + # + # pin 8 + # + self.shape = add(self.shape,translate(padr,width/2,-3*pitch,0)) + self.pad.append(point(width/2,-3*pitch,0)) + self.labels.append(self.text(self.pad[-1].x-dx,self.pad[-1].y,self.pad[-1].z,'RX')) + # + # pin 9 + # + self.shape = add(self.shape,translate(padr,width/2,-2*pitch,0)) + self.pad.append(point(width/2,-2*pitch,0)) + self.labels.append(self.text(self.pad[-1].x-dx,self.pad[-1].y,self.pad[-1].z,'SCK')) + # + # pin 10 + # + self.shape = add(self.shape,translate(padr,width/2,-1*pitch,0)) + self.pad.append(point(width/2,-1*pitch,0)) + self.labels.append(self.text(self.pad[-1].x-dx,self.pad[-1].y,self.pad[-1].z,'MISO')) + # + # pin 11 + # + self.shape = add(self.shape,translate(padr,width/2,0*pitch,0)) + self.pad.append(point(width/2,0*pitch,0)) + self.labels.append(self.text(self.pad[-1].x-dx,self.pad[-1].y,self.pad[-1].z,'MOSI')) + # + # pin 12 + # + self.shape = add(self.shape,translate(padr,width/2,1*pitch,0)) + self.pad.append(point(width/2,1*pitch,0)) + self.labels.append(self.text(self.pad[-1].x-dx,self.pad[-1].y,self.pad[-1].z,'3V3')) + # + # pin 13 + # + self.shape = add(self.shape,translate(padr,width/2,2*pitch,0)) + self.pad.append(point(width/2,2*pitch,0)) + self.labels.append(self.text(self.pad[-1].x-dx,self.pad[-1].y,self.pad[-1].z,'G')) + # + # pin 14 + # + self.shape = add(self.shape,translate(padr,width/2,3*pitch,0)) + self.pad.append(point(width/2,3*pitch,0)) + self.labels.append(self.text(self.pad[-1].x-dx,self.pad[-1].y,self.pad[-1].z,'5V')) + class AVRDB28(part): # # AVR*DB28