view venus/src/periph/led_mosfet.v @ 95:cc8fd0dbd2cf

D404 SS34: fully specify part (sourced from Digi-Key)
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 11 Jan 2022 19:38:57 +0000
parents 06e95ff0023b
children
line wrap: on
line source

/*
 * This module captures the circuit for showing the state of a digital signal
 * on a LED without loading that digital signal by driving the LED from VBAT
 * and using a MOSFET to control it.
 */

module led_mosfet (GND, VBAT, Signal);

input GND, VBAT, Signal;

wire R_to_LED, LED_to_Q;

resistor R (VBAT, R_to_LED);
basic_LED led (.A(R_to_LED), .C(LED_to_Q));
mosfet Q (.G(Signal), .S(GND), .D(LED_to_Q));

endmodule