Skip to content

Commit

Permalink
fleshing out uSD card
Browse files Browse the repository at this point in the history
  • Loading branch information
finger563 committed Mar 5, 2024
1 parent caa435c commit 82cddc2
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 62 deletions.
118 changes: 58 additions & 60 deletions ecad/elec/layout/default/esp-box-emu.kicad_pcb
Original file line number Diff line number Diff line change
Expand Up @@ -129,39 +129,37 @@
(net 38 "sbu2")
(net 39 "sbu1")
(net 40 "dat2")
(net 41 "cd_dat3")
(net 42 "cmd")
(net 43 "vdd")
(net 44 "clx")
(net 45 "vss")
(net 46 "dat0")
(net 47 "dat1")
(net 48 "net")
(net 49 "uSD-ep")
(net 50 "pmod1-_1")
(net 51 "pmod1-_2")
(net 52 "pmod1-_3")
(net 53 "pmod1-_4")
(net 54 "pmod1-_6")
(net 55 "pmod1-_8")
(net 56 "max17048-ep")
(net 57 "pin2x2-_1")
(net 58 "pin2x2-_2")
(net 59 "pin2x2-_3")
(net 60 "pin2x2-_4")
(net 61 "pmod2-_1")
(net 62 "pmod2-_2")
(net 63 "pmod2-_3")
(net 64 "pmod2-_4")
(net 65 "pmod2-_6")
(net 66 "pmod2-_8")
(net 67 "_5")
(net 68 "_7")
(net 41 "cmd")
(net 42 "dat0")
(net 43 "dat1")
(net 44 "net")
(net 45 "pmod1-_1")
(net 46 "pmod1-_2")
(net 47 "pmod1-_3")
(net 48 "pmod1-_4")
(net 49 "pmod1-_6")
(net 50 "pmod1-_8")
(net 51 "max17048-ep")
(net 52 "pin2x2-_1")
(net 53 "pin2x2-_2")
(net 54 "pin2x2-_3")
(net 55 "pin2x2-_4")
(net 56 "pmod2-_1")
(net 57 "pmod2-_2")
(net 58 "pmod2-_3")
(net 59 "pmod2-_4")
(net 60 "pmod2-_6")
(net 61 "pmod2-_8")
(net 62 "_5")
(net 63 "_7")
(net 64 "dat3")
(net 65 "clk")
(net 66 "uSD.card-ep")

(footprint "lib:SIM-SMD_C9900007362" (layer "F.Cu")
(tstamp 007075f0-6d01-45e0-b9a3-bcadcc27613a)
(at 167.78 124.24)
(path "/704fdf64-0ef6-53d4-8805-683d1ecebcb4/704fdf64-0ef6-53d4-8805-683d1ecebcb4")
(path "/a4d6eff6-13ad-a46f-5741-85c6192b1eab/a4d6eff6-13ad-a46f-5741-85c6192b1eab")
(attr smd)
(fp_text reference "U8" (at 0 -9.3) (layer "F.SilkS")
(effects (font (size 1 1) (thickness 0.15)))
Expand Down Expand Up @@ -202,29 +200,29 @@
(pad "1" smd rect (at 2.25 -5.3) (size 0.7 1.6) (layers "F.Cu" "F.Paste" "F.Mask")
(net 40 "dat2") (pintype "stereo") (tstamp 4b0ff713-ecb9-4b9d-b3fc-6db534c571b6))
(pad "2" smd rect (at 1.15 -5.3) (size 0.7 1.6) (layers "F.Cu" "F.Paste" "F.Mask")
(net 41 "cd_dat3") (pintype "stereo") (tstamp b0d6988e-9259-42ca-b0e8-633f2ee6691c))
(net 64 "dat3") (pintype "stereo") (tstamp b0d6988e-9259-42ca-b0e8-633f2ee6691c))
(pad "3" smd rect (at 0.05 -5.3) (size 0.7 1.6) (layers "F.Cu" "F.Paste" "F.Mask")
(net 42 "cmd") (pintype "stereo") (tstamp eef0e5c5-2ba2-4af0-8791-eb02a13edc6d))
(net 41 "cmd") (pintype "stereo") (tstamp eef0e5c5-2ba2-4af0-8791-eb02a13edc6d))
(pad "4" smd rect (at -1.05 -5.3) (size 0.7 1.6) (layers "F.Cu" "F.Paste" "F.Mask")
(net 43 "vdd") (pintype "stereo") (tstamp 1866473d-4125-4dbf-9e69-63a12064f394))
(net 21 "vcc") (pintype "stereo") (tstamp 1866473d-4125-4dbf-9e69-63a12064f394))
(pad "5" smd rect (at -2.15 -5.3) (size 0.7 1.6) (layers "F.Cu" "F.Paste" "F.Mask")
(net 44 "clx") (pintype "stereo") (tstamp 69fd9aeb-3c50-4c18-ad1e-7b80fb6232e1))
(net 65 "clk") (pintype "stereo") (tstamp 69fd9aeb-3c50-4c18-ad1e-7b80fb6232e1))
(pad "6" smd rect (at -3.25 -5.3) (size 0.7 1.6) (layers "F.Cu" "F.Paste" "F.Mask")
(net 45 "vss") (pintype "stereo") (tstamp cfcc7df2-252a-4c0f-92c6-7a1bc2911408))
(net 9 "gnd") (pintype "stereo") (tstamp cfcc7df2-252a-4c0f-92c6-7a1bc2911408))
(pad "7" smd rect (at -4.35 -5.3) (size 0.7 1.6) (layers "F.Cu" "F.Paste" "F.Mask")
(net 46 "dat0") (pintype "stereo") (tstamp 8dff4f3f-09d4-4e6b-b92e-20535a966286))
(net 42 "dat0") (pintype "stereo") (tstamp 8dff4f3f-09d4-4e6b-b92e-20535a966286))
(pad "8" smd rect (at -5.45 -5.3) (size 0.7 1.6) (layers "F.Cu" "F.Paste" "F.Mask")
(net 47 "dat1") (pintype "stereo") (tstamp f2940ea9-a5f4-4a67-b849-fef132764ca7))
(net 43 "dat1") (pintype "stereo") (tstamp f2940ea9-a5f4-4a67-b849-fef132764ca7))
(pad "CD" smd rect (at -6.55 -5.3) (size 0.7 1.6) (layers "F.Cu" "F.Paste" "F.Mask")
(net 48 "net") (pintype "stereo") (tstamp 80feebb9-6d97-483d-a73f-e81d0dd067f6))
(net 44 "net") (pintype "stereo") (tstamp 80feebb9-6d97-483d-a73f-e81d0dd067f6))
(pad "G" smd rect (at -7.76 5.3) (size 1.2 2.2) (layers "F.Cu" "F.Paste" "F.Mask")
(net 49 "uSD-ep") (pintype "stereo") (tstamp ae67687f-628b-426f-bc7f-eb9e87588428))
(net 66 "uSD.card-ep") (pintype "stereo") (tstamp ae67687f-628b-426f-bc7f-eb9e87588428))
(pad "G" smd rect (at -7.75 -3.99) (size 1.2 1.8) (layers "F.Cu" "F.Paste" "F.Mask")
(net 49 "uSD-ep") (pintype "stereo") (tstamp bda72b8d-606a-436f-a0ea-ebcabd8f91f9))
(net 66 "uSD.card-ep") (pintype "stereo") (tstamp bda72b8d-606a-436f-a0ea-ebcabd8f91f9))
(pad "G" smd rect (at 6.85 -4.29) (size 1.6 1.5) (layers "F.Cu" "F.Paste" "F.Mask")
(net 49 "uSD-ep") (pintype "stereo") (tstamp 6fc2580f-7fb2-4a91-b165-ce1a5c8e0b2d))
(net 66 "uSD.card-ep") (pintype "stereo") (tstamp 6fc2580f-7fb2-4a91-b165-ce1a5c8e0b2d))
(pad "G" smd rect (at 7.76 5.3) (size 1.2 2.2) (layers "F.Cu" "F.Paste" "F.Mask")
(net 49 "uSD-ep") (pintype "stereo") (tstamp 16e0577b-c1db-4f27-8f35-9ddfd3b81771))
(net 66 "uSD.card-ep") (pintype "stereo") (tstamp 16e0577b-c1db-4f27-8f35-9ddfd3b81771))
(model "/Users/bob/esp-cpp/esp-box-emu/ecad/elec/footprints/footprints.3dshapes/SIM-SMD_C9900007362.wrl"
(offset (xyz -0 -2.19 0.5))
(scale (xyz 1 1 1))
Expand Down Expand Up @@ -264,21 +262,21 @@
(fp_circle (center -7.62 2.5) (end -7.59 2.5)
(stroke (width 0.06) (type solid)) (fill none) (layer "F.Fab") (tstamp 1c0f62d9-3693-44ee-a86b-4460619ef9f9))
(pad "1" thru_hole rect (at -6.35 1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 50 "pmod1-_1") (pintype "stereo") (tstamp a3b60a77-8fcc-40b9-98c4-389c2a527b5f))
(net 45 "pmod1-_1") (pintype "stereo") (tstamp a3b60a77-8fcc-40b9-98c4-389c2a527b5f))
(pad "2" thru_hole circle (at -6.35 -1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 51 "pmod1-_2") (pintype "stereo") (tstamp c54385e6-191b-4863-9dab-9566fac5cb6b))
(net 46 "pmod1-_2") (pintype "stereo") (tstamp c54385e6-191b-4863-9dab-9566fac5cb6b))
(pad "3" thru_hole circle (at -3.81 1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 52 "pmod1-_3") (pintype "stereo") (tstamp 11adadfc-cecb-4a81-9db1-c8402bd0ef8e))
(net 47 "pmod1-_3") (pintype "stereo") (tstamp 11adadfc-cecb-4a81-9db1-c8402bd0ef8e))
(pad "4" thru_hole circle (at -3.81 -1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 53 "pmod1-_4") (pintype "stereo") (tstamp 6fdaa029-0fa5-4b9d-8186-83a20ac8d415))
(net 48 "pmod1-_4") (pintype "stereo") (tstamp 6fdaa029-0fa5-4b9d-8186-83a20ac8d415))
(pad "5" thru_hole circle (at -1.27 1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 27 "dm") (pintype "stereo") (tstamp 9b5ae596-83df-4fd3-ae27-1d03b776c31e))
(pad "6" thru_hole circle (at -1.27 -1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 54 "pmod1-_6") (pintype "stereo") (tstamp fbb83446-ade6-4248-bed0-7be4a003e954))
(net 49 "pmod1-_6") (pintype "stereo") (tstamp fbb83446-ade6-4248-bed0-7be4a003e954))
(pad "7" thru_hole circle (at 1.27 1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 28 "dp") (pintype "stereo") (tstamp ca9e64a3-1776-48b3-ba08-5b6c165c72c7))
(pad "8" thru_hole circle (at 1.27 -1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 55 "pmod1-_8") (pintype "stereo") (tstamp 2365266a-2c88-453a-8207-a7536732e0f9))
(net 50 "pmod1-_8") (pintype "stereo") (tstamp 2365266a-2c88-453a-8207-a7536732e0f9))
(pad "9" thru_hole circle (at 3.81 1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 9 "gnd") (pintype "stereo") (tstamp c35a4927-6506-45af-ab40-8c51da1548f0))
(pad "10" thru_hole circle (at 3.81 -1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
Expand Down Expand Up @@ -326,21 +324,21 @@
(fp_circle (center -7.62 2.5) (end -7.59 2.5)
(stroke (width 0.06) (type solid)) (fill none) (layer "F.Fab") (tstamp 78060a9f-14ed-4f19-89b9-e763369938ab))
(pad "1" thru_hole rect (at -6.35 1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 61 "pmod2-_1") (pintype "stereo") (tstamp b7db8e93-136e-4ce7-adc4-8351527b33e1))
(net 56 "pmod2-_1") (pintype "stereo") (tstamp b7db8e93-136e-4ce7-adc4-8351527b33e1))
(pad "2" thru_hole circle (at -6.35 -1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 62 "pmod2-_2") (pintype "stereo") (tstamp 304ba03b-e761-4801-ab66-8ccd29362be8))
(net 57 "pmod2-_2") (pintype "stereo") (tstamp 304ba03b-e761-4801-ab66-8ccd29362be8))
(pad "3" thru_hole circle (at -3.81 1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 63 "pmod2-_3") (pintype "stereo") (tstamp 19535c2d-d0c2-4ede-aa1a-b6010ffc9688))
(net 58 "pmod2-_3") (pintype "stereo") (tstamp 19535c2d-d0c2-4ede-aa1a-b6010ffc9688))
(pad "4" thru_hole circle (at -3.81 -1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 64 "pmod2-_4") (pintype "stereo") (tstamp 7ca27ed0-9331-4d28-9fdd-ece949452032))
(net 59 "pmod2-_4") (pintype "stereo") (tstamp 7ca27ed0-9331-4d28-9fdd-ece949452032))
(pad "5" thru_hole circle (at -1.27 1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 67 "_5") (pintype "stereo") (tstamp 963c584a-ffd9-426f-8d47-cadea81998ea))
(net 62 "_5") (pintype "stereo") (tstamp 963c584a-ffd9-426f-8d47-cadea81998ea))
(pad "6" thru_hole circle (at -1.27 -1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 65 "pmod2-_6") (pintype "stereo") (tstamp 4b0651d5-db25-4fbc-90fd-a4a8f5c1edf0))
(net 60 "pmod2-_6") (pintype "stereo") (tstamp 4b0651d5-db25-4fbc-90fd-a4a8f5c1edf0))
(pad "7" thru_hole circle (at 1.27 1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 68 "_7") (pintype "stereo") (tstamp 6fd18e46-3ea9-4eb7-b273-43c086535bbf))
(net 63 "_7") (pintype "stereo") (tstamp 6fd18e46-3ea9-4eb7-b273-43c086535bbf))
(pad "8" thru_hole circle (at 1.27 -1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 66 "pmod2-_8") (pintype "stereo") (tstamp 38aab6b8-43c4-418e-9d3d-f3373ab87fb8))
(net 61 "pmod2-_8") (pintype "stereo") (tstamp 38aab6b8-43c4-418e-9d3d-f3373ab87fb8))
(pad "9" thru_hole circle (at 3.81 1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
(net 9 "gnd") (pintype "stereo") (tstamp 8782db24-556a-4e68-b77f-9b4ab46091ee))
(pad "10" thru_hole circle (at 3.81 -1.27) (size 1.7 1.7) (drill 1.100023) (layers "*.Cu" "*.Mask")
Expand Down Expand Up @@ -400,7 +398,7 @@
(pad "8" smd rect (at -0.75 -0.93) (size 0.28 0.51) (layers "F.Cu" "F.Paste" "F.Mask")
(net 20 "sda") (pintype "stereo") (tstamp e083ff73-c785-43fa-a5ad-2af5a08737f7))
(pad "9" smd rect (at 0 0) (size 1.65 0.9) (layers "F.Cu" "F.Paste" "F.Mask")
(net 56 "max17048-ep") (pintype "stereo") (tstamp 35b7cb9c-45a8-435c-b2f6-a71e30c76c9a))
(net 51 "max17048-ep") (pintype "stereo") (tstamp 35b7cb9c-45a8-435c-b2f6-a71e30c76c9a))
(model "/Users/bob/esp-cpp/esp-box-emu/ecad/elec/footprints/footprints.3dshapes/DFN-8_L2.0-W2.0-H0.8-P0.50.wrl"
(offset (xyz 0 -0 -0))
(scale (xyz 1 1 1))
Expand Down Expand Up @@ -540,13 +538,13 @@
(fp_circle (center -2.54 2.54) (end -2.51 2.54)
(stroke (width 0.06) (type solid)) (fill none) (layer "F.Fab") (tstamp d179ffe6-58b8-42e0-a5f3-8278d68f6812))
(pad "1" thru_hole rect (at -1.27 1.27) (size 1.52 1.52) (drill 0.9144) (layers "*.Cu" "*.Mask")
(net 57 "pin2x2-_1") (pintype "stereo") (tstamp 3ff72500-180a-489f-8918-4703fe58d0c8))
(net 52 "pin2x2-_1") (pintype "stereo") (tstamp 3ff72500-180a-489f-8918-4703fe58d0c8))
(pad "2" thru_hole circle (at -1.27 -1.27) (size 1.52 1.52) (drill 0.9144) (layers "*.Cu" "*.Mask")
(net 58 "pin2x2-_2") (pintype "stereo") (tstamp 86b28bf6-fe0f-4ff2-8708-cc7863fdaa41))
(net 53 "pin2x2-_2") (pintype "stereo") (tstamp 86b28bf6-fe0f-4ff2-8708-cc7863fdaa41))
(pad "3" thru_hole circle (at 1.27 1.27) (size 1.52 1.52) (drill 0.9144) (layers "*.Cu" "*.Mask")
(net 59 "pin2x2-_3") (pintype "stereo") (tstamp 4e94e0e8-24e4-41ca-97ad-048a186caf24))
(net 54 "pin2x2-_3") (pintype "stereo") (tstamp 4e94e0e8-24e4-41ca-97ad-048a186caf24))
(pad "4" thru_hole circle (at 1.27 -1.27) (size 1.52 1.52) (drill 0.9144) (layers "*.Cu" "*.Mask")
(net 60 "pin2x2-_4") (pintype "stereo") (tstamp bc91fde6-9655-4a4f-81ec-932b573fef36))
(net 55 "pin2x2-_4") (pintype "stereo") (tstamp bc91fde6-9655-4a4f-81ec-932b573fef36))
(model "/Users/bob/esp-cpp/esp-box-emu/ecad/elec/footprints/footprints.3dshapes/HDR2.54-M-LI-2x2P.wrl"
(offset (xyz 0 -0 0))
(scale (xyz 1 1 1))
Expand Down
13 changes: 13 additions & 0 deletions ecad/elec/src/HYCW118-TF09-200B.ato
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from "generics/interfaces.ato" import SDIO, Power

component HYCW118_TF09_200B:
# component HYCW118-TF09-200B
footprint = "SIM-SMD_C9900007362"
Expand All @@ -15,3 +17,14 @@ component HYCW118_TF09_200B:
signal CD ~ pin CD
signal EP ~ pin G

module MicroSdCard from SDIO:
card = new HYCW118_TF09_200B
power = new Power
power.vcc ~ card.VDD
power.gnd ~ card.VSS
dat0 ~ card.DAT0
dat1 ~ card.DAT1
dat2 ~ card.DAT2
dat3 ~ card.CD_DAT3
cmd ~ card.CMD
clk ~ card.CLX
6 changes: 4 additions & 2 deletions ecad/elec/src/esp-box-emu.ato
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ from "MBR0520LT1G.ato" import MBR0520LT1G
from "MCP73831T-2ACI_OT.ato" import MCP73831T_2ACI_OT

# uSD card
from "HYCW118-TF09-200B.ato" import HYCW118_TF09_200B
from "HYCW118-TF09-200B.ato" import MicroSdCard

# usb-c connector
from "TYPE-611-T3-W.ato" import TYPE_611_T3_W
Expand Down Expand Up @@ -100,7 +100,9 @@ module EspBoxEmu:
max17048.CELL ~ power_bat.vcc

# micro-SD card
uSD = new HYCW118_TF09_200B
uSD = new MicroSdCard
uSD.power ~ power_3v3
# TODO: connect SPI signals or SDIO signals

# haptics
drv2605 = new Drv2605
Expand Down

0 comments on commit 82cddc2

Please sign in to comment.