comparison mmtb1/schem+bom/vsrc/led_circuit.v @ 0:0f9bdd60ce50

fc-small-hw separated from old freecalypso-schem repo
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 21 Oct 2019 00:53:38 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:0f9bdd60ce50
1 /*
2 * This module captures the circuit for showing the state of a digital signal
3 * on a LED without loading that digital signal by driving the LED from VBAT
4 * and using a MOSFET to control it.
5 */
6
7 module led_circuit (GND, VBAT, Signal);
8
9 input GND, VBAT, Signal;
10
11 wire R_to_LED, LED_to_Q;
12
13 resistor R (VBAT, R_to_LED);
14 diode led (.A(R_to_LED), .C(LED_to_Q));
15 mosfet Q (.G(Signal), .S(GND), .D(LED_to_Q));
16
17 endmodule