Skip to content

Commit

Permalink
config: analog trimmer pot
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMightyDuckOfDoom committed May 27, 2024
1 parent ace795c commit 5366cfa
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 14 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ MARKDOWN_FILE_NAME := $(basename $(MARKDOWN_FILES))
all: gen-pdk

out/testboard.v: examples/testboard.v
mkdir -p out
cp $^ $@

testboard: PROJECT := testboard
testboard: SRC := out/testboard.v
testboard: PCB_WIDTH := 100
testboard: PCB_HEIGHT := 100
testboard: out/testboard.v chip pcb
testboard: out/testboard.v chip_gui

.setup:
pip install -r requirements.txt --break-system-packages
Expand Down
10 changes: 10 additions & 0 deletions config/footprints.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,16 @@
"y_center_spacing": 15.367
},
{
"names": ["trimmer_3pin_2_54mm"],
"single_row": true,
"through_hole": true,
"num_pins": 3,
"hole_diameter": 1.0,
"pad_height": 1.7,
"pad_width": 1.7,
"x_center_spacing": 2.54,
"y_center_spacing": 0
},{
"names": ["header_16pin_2_54mm"],
"single_row": true,
"through_hole": true,
Expand Down
24 changes: 24 additions & 0 deletions config/libraries/Analog.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,30 @@
}
]
},
{
"name": "VDIV_TRIMMER_POT",
"desc": "Voltage Divider Trimmer Potentiometer",
"footprint": "trimmer_3pin_2_54mm",
"power": [
{
"name": "VDD",
"pin_number": 1,
"function": "power"
},
{
"name": "GND",
"pin_number": 3,
"function": "ground"
}
],
"outputs": [
{
"name": "Y",
"pin_number": 2,
"function": "1"
}
]
},
{
"name": "Led_Res_0603",
"desc": "0603 Led with 0603 Resistor",
Expand Down
17 changes: 4 additions & 13 deletions examples/testboard.v
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ module testboard (
.Y ( switch[7:0] )
);

VDIV_TRIMMER_POT i_pot (
.Y ()
);

// Switch Pulldowns
PULLDOWN_R0603 i_switch_pulldown_0 (
.Y ( switch[0] )
Expand Down Expand Up @@ -178,23 +182,10 @@ module testboard (
.Y ( result[12] )
);

OA21_74LVC1G3208 i_oa21 (
.A ( switch[0] ),
.B ( switch[1] ),
.C ( switch[2] ),
.Y ( result[13] )
);

XOR2_74LVC1G86 i_xor (
.A ( switch[0] ),
.B ( switch[1] ),
.Y ( result[14] )
);

XOR3_74LVC1G386 i_xor3 (
.A ( switch[0] ),
.B ( switch[1] ),
.C ( switch[2] ),
.Y ( result[15] )
);
endmodule

0 comments on commit 5366cfa

Please sign in to comment.