FreeCalypso > hg > fc-small-hw
annotate mmtb1/schem+bom/vsrc/led_circuit.v @ 13:c016671a4b4a
lunakpd1 project started
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 09 May 2020 00:38:07 +0000 |
parents | 0f9bdd60ce50 |
children |
rev | line source |
---|---|
0
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * This module captures the circuit for showing the state of a digital signal |
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * on a LED without loading that digital signal by driving the LED from VBAT |
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 * and using a MOSFET to control it. |
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 */ |
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 |
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 module led_circuit (GND, VBAT, Signal); |
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 |
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 input GND, VBAT, Signal; |
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 wire R_to_LED, LED_to_Q; |
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 |
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 resistor R (VBAT, R_to_LED); |
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 diode led (.A(R_to_LED), .C(LED_to_Q)); |
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 mosfet Q (.G(Signal), .S(GND), .D(LED_to_Q)); |
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 |
0f9bdd60ce50
fc-small-hw separated from old freecalypso-schem repo
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 endmodule |