Exemplo n.º 1
0
    c1v2 = caps(brd.DC((47.4, 9.4)).left(90), 'GBL', 'GL2', 2)
    c1v2[0].pads[0].setlayer('GBL').w("r 90 f 2").wire()
    caps(brd.DC((43.7, 2.8)).left(90), 'GL2', 'GBL', 2)

    caps(brd.DC((37.0, 1.5)), 'GL2', 'GL3', 2)
    caps(brd.DC((41.5, 18.6)).right(45), 'GL2', 'GL3', 1)

    if 1:
        brd.outline()
    else:
        brd.oversize(2)
    brd.fill()
    brd.check()

    if 0:
        im = Image.open("img/dazzler-logo.png").transpose(Image.ROTATE_270)
        brd.logo(6.4, 28.8, im)
        im = Image.open("img/gd3x-logo.png")
        brd.logo(9.1, 36, im, 0.8)
        im = Image.open("img/oshw-logo-outline.png")
        brd.logo(6.9, 13.6, im, 0.5)

        x = j1.center.xy[0] + 0.5
        for i,s in enumerate(["(C) 2020", "EXCAMERA LABS", str(__VERSION__)]):
            brd.annotate(x, 35.3 - 1.5 * i, s)

    brd.save("dazzler")
    svgout.write(brd, "dazzler.svg")
    tikzout.write(brd, "dazzler.tikz")
    lx9.dump_ucf("dazzler")
Exemplo n.º 2
0
        brd.logo(75.8, 6.2, gentext("PLAYER 1"), scale=0.4)
        brd.logo(75.8, 46.9, gentext("PLAYER 2"), scale=0.4)

        brd.logo(76,
                 53.3 / 2 - 12,
                 gentext("1").transpose(Image.ROTATE_90),
                 scale=1.0)
        brd.logo(76,
                 53.3 / 2 + 12,
                 gentext("2").transpose(Image.ROTATE_90),
                 scale=1.0)

        brd.logo(75.8,
                 53.3 / 2,
                 Image.open("img/oshw-logo-outline.png").transpose(
                     Image.ROTATE_90),
                 scale=0.7)

        for i, s in enumerate(["(C) 2020", "EXCAMERA LABS", str(__VERSION__)]):
            brd.annotate(57.5, 8.5 - 1.5 * i, s)

    if 1:
        brd.fill_any("GTL", "VCC")
        brd.fill_any("GBL", "GL2")

    brd.save("rc2014_dazzler")
    for n in brd.nets:
        print(n)
    svgout.write(brd, "rc2014_dazzler.svg")
Exemplo n.º 3
0
def gen(target):
    brd = cu.Board(
        (90, 63),
        trace = cu.mil(6),
        space = cu.mil(6) * 2.0,
        via_hole = 0.3,
        via = 0.6,
        via_space = cu.mil(5),
        silk = cu.mil(6))
    brd.outline()
    brd.layers['GML'].union(sg.box(-9.8, 0, 0, 16))

    daz = Dazzler(brd.DC((28, 38)).left(90))
    if target == "pico":
        pico = Pico(brd.DC((70, 28)))
    elif target == "teensy":
        teensy = Teensy40(brd.DC((70, 28)))
        breakout(teensy)
    elif target == "feather":
        feather = Feather(brd.DC((70, 28)))
        breakout(feather)
    sd = SD(brd.DC((3, 12)).right(180))

    # ------------------------------ SD
    for nm in ("G1", "G2", "G3", "G4", "6"):
        sd.s(nm).w("r 90 f 1 -")
    sd.s("4").setname("VCC").w("r 90 f 2").wire()

    tt = [sd.s(c) for c in "1235789"]
    [t.left(90).forward(1) for t in tt]
    r0 = brd.enriver90(tt, 90).left(135).wire()

    tt = [daz.s(str(15 + i)) for i in range(7)]
    [t.w("o f .1") for t in tt]
    r1 = brd.enriver90(tt, 90).left(45).meet(r0)

    # ------------------------------ Wii
    def wii(i):
        y = 32.5 + 6 - i * 12
        return cu.WiiPlug(brd.DC((-5, y)).right(270)).escape()
    wii1 = wii(-1)
    wii2 = wii(1)
    wii1.w("r 90 f 2").wire()
    wii2.w("f 10 r 45 f 4 r 45").wire()
    wii = wii2.join(wii1, 0.5).wire()

    tt = [daz.s(str(i)) for i in (13, 12, 11, 10, 9, 8)]
    [t.w("i f 4") for t in tt]
    daz_i2cbus = brd.enriver90(tt, -90).wire()

    wii.w("f 9 r 90 f 3 /").meet(daz_i2cbus)

    # ------------------------------ Dazzler power
    daz.s("VCC").thermal(1).wire()
    for nm in ("GND", "GND1", "GND2"):
        daz.s(nm).inside().forward(2).wire(width = 0.5).w("-")

    daz_used = ("1", "2", "22", "23", "25", "26", "27", "28", "29", "PGM")
    tt = [daz.s(nm) for nm in daz_used]
    [p.w("i f 4").wire() for p in tt]
    daz.s("1").left(90)
    daz.s("2").forward(1).left(90)
    daz.s("PGM").right(90)
    cu.extend2(tt)
    b1 = brd.enriver90(tt[::-1], 90)

    if target == "pico":
        b1.w("l 90 f 2 r 45").wire()
        pico_used = (
            "GP0",
            "GP2", "GP3", "GP4", "GP5",
            "GP6", "GP7", "GP8", "GP9", "GP10"
        )
        tt = [pico.s(str(i)) for i in pico_used]
        [p.setlayer("GBL").w("r 180 f 2").wire() for p in tt]
        b0 = brd.enriver90(tt[::-1], -90).wire()

        b0.shuffle(b1, {         # Pico         Dazzler    
            "GP8": "1"  ,    # UART1 TX     CONSOLE IN 
            "GP9": "2"  ,    # UART1 RX     CONOLE OUT 
            "GP4": "22" ,    # SPI0 RX      MISO       
            "GP5": "25" ,    # GP5          GPU SEL    
            "GP6": "26" ,    # GP6          SD SEL     
            "GP7": "27" ,    # GP7          DAZZLER SEL
            "GP3": "28" ,    # SPI0 TX      MOSI       
            "GP2": "29" ,    # SPI0 SCK     SCK        
            "GP10":"PGM",    # GP10         PGM        
            "GP0": "23" ,    # UART0 TX     UART       
        }).w("f 9 l 45").meet(b1)
        daz.s("5V").setwidth(0.5).w("o f 1 l 90 f 7 r 90 f 14 r 90 f 2.5").goto(pico.s("VBUS")).wire()
    elif target == "teensy":
        b1.w("l 45 f 2 r 45").wire()
        teensy_used = (
            "1", "8", "9", "10", "11", "12",
            "13", "14", "15", "16"
        )
        tt = [teensy.s(str(i)) for i in teensy_used]
        [p.setlayer("GBL").w("l 90 f 2").wire() for p in tt]
        rv0 = brd.enriver90(tt[:6][::-1], -90).wire()
        rv1 = brd.enriver90(tt[6:][::-1], 90).wire()
        b0 = rv1.join(rv0, 1).forward(2).wire()
        b0.shuffle(b1, {    # Teensy       Dazzler
            "14": "1"  ,    # TX3          CONSOLE IN 
            "15": "2"  ,    # RX3          CONOLE OUT 
            "12": "22" ,    # MISO         MISO       
            "8" : "25" ,    # 8            GPU SEL    
            "9" : "26" ,    # 9            SD SEL     
            "10": "27" ,    # 10           DAZZLER SEL
            "11": "28" ,    # MOSI         MOSI       
            "13": "29" ,    # SCK          SCK        
            "16":"PGM" ,    # 16           PGM        
            "1" : "23" ,    # UART0 TX     UART       
        }).w("f 8").meet(b1)
        daz.s("5V").setwidth(0.5).w("o f 2 r 90 f 39 l 90 f 23").goto(teensy.s("VIN")).wire()
    elif target == "feather":
        mapping = {
#           Feather             Dazzler
            "SCK"   : "29" ,    # SCK        
            "MOSI"  : "28" ,    # MOSI       
            "MISO"  : "22" ,    # MISO       
            "TX"    : "23" ,    # UART       
            "D4"    : "25" ,    # GPU SEL    
            "D5"    : "26" ,    # SD SEL     
            "D6"    : "27" ,    # DAZZLER SEL
            "D9"    :"PGM" ,    # PGM        
            "D10"   : "2"  ,    # CONOLE OUT 
            "D12"   : "1"  ,    # CONSOLE IN 
        }
        b1.w("l 45 f 2 r 45").wire()
        used = mapping.keys()
        tt = [feather.s(str(i)) for i in used]
        [p.setlayer("GBL").w("l 90 f 2").wire() for p in tt]
        rv0 = brd.enriver90(tt[:5][::-1], -90).wire()
        rv1 = brd.enriver90(tt[5:][::-1], 90).wire()
        b0 = rv1.join(rv0, 1).forward(19).wire()
        b0.shuffle(b1, mapping).w("f 8").meet(b1)
        daz.s("5V").setwidth(0.5).w("o f 2 r 90 f 41 l 90 f 23").goto(feather.s("USB")).wire()

    if 1:
        im = Image.open("img/gameduino-mono.png")
        brd.logo(16, 4, im)

        im = Image.open("img/dazzler-logo.png")
        brd.logo(36, 4, im)

        if target == "pico":
            brd.logo(pico.center.xy[0], pico.center.xy[1] - 15, gentext("PICO"))
        else:
            brd.logo(70, 4, gentext(target))

        brd.logo(-5, 38.5 - 12, gentext("2").transpose(Image.ROTATE_270), scale = 0.9)
        brd.logo(-5, 38.5 + 12, gentext("1").transpose(Image.ROTATE_270), scale = 0.9)

        brd.logo(-4.8, 38.5, Image.open("img/oshw-logo-outline.png").transpose(Image.ROTATE_270), scale = 0.7)

        for i,s in enumerate(["(C) 2021", "EXCAMERA LABS", str(__VERSION__)]):
            brd.annotate(81, 60 - 1.5 * i, s)

    if 1:
        brd.fill_any("GTL", "VCC")
        brd.fill_any("GBL", "GL2")

    name = target + "_dazzler"
    brd.save(name)
    for n in brd.nets:
        print(n)
    svgout.write(brd, name + ".svg")
Exemplo n.º 4
0
        brd.logo(75.8, 6.2, gentext("PLAYER 1"), scale=0.4)
        brd.logo(75.8, 46.9, gentext("PLAYER 2"), scale=0.4)

        brd.logo(76,
                 53.3 / 2 - 12,
                 gentext("1").transpose(Image.ROTATE_90),
                 scale=1.0)
        brd.logo(76,
                 53.3 / 2 + 12,
                 gentext("2").transpose(Image.ROTATE_90),
                 scale=1.0)

        brd.logo(75.8,
                 53.3 / 2,
                 Image.open("img/oshw-logo-outline.png").transpose(
                     Image.ROTATE_90),
                 scale=0.7)

        for i, s in enumerate(["(C) 2020", "EXCAMERA LABS", str(__VERSION__)]):
            brd.annotate(57.5, 8.5 - 1.5 * i, s)

    brd.outline()
    if 1:
        brd.fill_any("GTL", "VCC")
        brd.fill_any("GBL", "GL2")

    brd.save("6502")
    for n in brd.nets:
        print(n)
    svgout.write(brd, "6502.svg")
Exemplo n.º 5
0
        p.setname(nm)
        p.copy().w("l 90 f 2").ltext(nm)
    gnd(pwr5.s("GND"))
    pwr5.s("5V").setwidth(0.4).meet(daz.s("5V"))

    # d1 = daz.escapes([str(i) for i in range(1, 15)], -90).forward(5).right(45).wire()
    # d2 = daz.escapes([str(i) for i in range(15, 30)], 90).forward(4).spread(1.2).wire()
    # daz12 = d1.join(d2, 0.5).wire()

    daz.s("VCC").thermal(1).wire()
    for nm in ("GND", "GND1", "GND2"):
        daz.s(nm).inside().forward(2).wire(width=0.5).w("-")

    brd.outline()
    if 1:
        brd.fill_any("GTL", "VCC")
        brd.fill_any("GBL", "GL2")

    if 1:
        im = Image.open("img/dazzler-logo.png").transpose(Image.ROTATE_270)
        brd.logo(13, 64, im)
        im = Image.open("img/gd3x-logo.png")
        brd.logo(15.7, 71.2, im, 0.8)
        im = Image.open("img/oshw-logo-outline.png")
        brd.logo(6, 5, im, 0.5)

    brd.save("breakout_dazzler")
    for n in brd.nets:
        print(n)
    svgout.write(brd, "breakout_dazzler.svg")
Exemplo n.º 6
0
        brd.logo(75.8, 6.2, gentext("PLAYER 1"), scale=0.4)
        brd.logo(75.8, 46.9, gentext("PLAYER 2"), scale=0.4)

        brd.logo(76,
                 53.3 / 2 - 12,
                 gentext("1").transpose(Image.ROTATE_90),
                 scale=1.0)
        brd.logo(76,
                 53.3 / 2 + 12,
                 gentext("2").transpose(Image.ROTATE_90),
                 scale=1.0)

        brd.logo(75.8,
                 53.3 / 2,
                 Image.open("img/oshw-logo-outline.png").transpose(
                     Image.ROTATE_90),
                 scale=0.7)

        for i, s in enumerate(["(C) 2020", "EXCAMERA LABS", str(__VERSION__)]):
            brd.annotate(57.5, 8.5 - 1.5 * i, s)

    if 1:
        brd.fill_any("GTL", "VCC")
        brd.fill_any("GBL", "GL2")

    brd.save("arduino_dazzler")
    for n in brd.nets:
        print(n)
    svgout.write(brd, "arduino_dazzler.svg")
Exemplo n.º 7
0
            teensy.pads[-1]).wire()
        straight(teensy.s("16"), daz.pads[8])
        straight(teensy.s("17"), daz.pads[7])

        sda.w("f 33 r 90").wire().via().setlayer("GTL").goto(
            teensy.s("18")).wire()
        scl.w("l 90 f 1 r 90 f 35 r 90").wire().via().setlayer("GTL").goto(
            teensy.s("19")).wire()

        tt = daz.pads[:5][::-1]
        [t.w("f 2") for t in tt]
        jtag1 = brd.enriver(tt, 45)
        jtag1.w("l 45").wire()

        tt = teensy.pads[9:14][::-1]
        [t.w("l 90 f 1") for t in tt]
        jtag2 = brd.enriver(tt, 45).w("f 13 l 45").wire()

        jtag1.meet(jtag2)

    brd.outline()

    if 1:
        brd.space = cu.mil(12)  # XXX hack the
        brd.fill_any("GTL", "GTL")
        brd.fill_any("GBL", "GBL")

    brd.save("loader")
    svgout.write(brd, "loader.svg")
    brd.postscript("loader.ps")