proc SCHEMATIC_rc_filter_first_order {} {


make input -name in -origin {-230 80}
make output -name out -origin {100 80}
make input -name gnd -origin {-230 220}
make capacitor -name C0 -capacitance capacitance -origin {70 150}
make resistor -orient R90 -name R0 -resistance resistance -noise_enable noise_enable -origin {-100 80}
  make_wire -230 80 -140 80
  make_wire 70 80 -60 80
  make_wire 70 80 100 80
  make_wire -230 220 70 220
  make_wire 70 80 70 110
  make_wire 70 190 70 220


}

proc ICON_rc_filter_first_order args {
  icon_setup $args {{origin {0 0}} {orient R0} {name x} {resistance 1k} {capacitance 10p} {noise_enable 0} {electrical_integration_damping_factor 1.0}}
icon_term -type input -origin {-100 0} -name in
icon_term -type input -origin {-100 50} -name gnd
icon_term -type output -origin {100 0} -name out
icon_property -origin {-90 0} -label in
icon_property -origin {-90 50} -label gnd
icon_property -origin {90 0} -anchor e -label out
icon_property -origin {-90 -50} -label {$name}
icon_property -origin {-90 -30} -label rc_filter_first_order
  icon_line -100 -40 100 -40 100 60 -100 60 -100 -40
icon_property -origin {-90 70} -label {resistance=$resistance}
  icon_property -origin {-90 170} -type user -name name -default x
  icon_property -origin {-90 190} -type user -name resistance -default 1k
icon_property -origin {-90 90} -label {capacitance=$capacitance}
icon_property -origin {-90 110} -label {noise_enable=$noise_enable (0 or 1)}
  icon_property -origin {-90 210} -type user -name capacitance -default 10p
  icon_property -origin {-90 230} -type user -name noise_enable -default 0
  icon_line 70 0 20 0 10 -10 0 10 -10 -10 -20 10 -30 -10 -40 0 -70 0
  icon_line 50 0 50 20
  icon_line 30 20 70 20
  icon_line 30 30 70 30
  icon_line 50 30 50 50
  icon_line -60 50 70 50
icon_property -origin {-90 130} -label {electrical_integration_damping_factor=$electrical_integration_damping_factor (0.0 to 1.0)}
  icon_property -origin {-90 250} -type user -name electrical_integration_damping_factor -default 1.0
}

