changeset 52:06e95ff0023b

ON_nOFF indicator LED implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 27 Nov 2021 18:34:05 +0000
parents 9de8e7a43160
children d9ae0e85aea2
files venus/src/MCL venus/src/Makefile venus/src/periph/led_mosfet.v venus/src/periph/led_npn.v venus/src/top/mobile.v
diffstat 5 files changed, 44 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/venus/src/MCL	Sat Nov 27 07:03:14 2021 +0000
+++ b/venus/src/MCL	Sat Nov 27 18:34:05 2021 +0000
@@ -543,6 +543,7 @@
 
 # PWON LED
 D309:
+ hier=mob.led_PWON.led
  part=green-led
 
 # LPG LED
@@ -748,7 +749,7 @@
 
 # MOSFET for driving the power on LED
 Q309:
- #hier=led.Q
+ hier=mob.led_PWON.Q
  device=Si1032R
  pinout=Si1032R.pinout
  npins=3
@@ -872,7 +873,7 @@
 
 R330:
  # power on LED series resistor
- #hier=led.R
+ hier=mob.led_PWON.R
  value=470R
  footprint=0402
  npins=2
--- a/venus/src/Makefile	Sat Nov 27 07:03:14 2021 +0000
+++ b/venus/src/Makefile	Sat Nov 27 18:34:05 2021 +0000
@@ -13,15 +13,15 @@
 	periph/calypso_uart_in.v periph/charging_circuit.v \
 	periph/charging_led.v periph/inv_buffer_74LVC1G04.v periph/jtag_if.v \
 	periph/keypad.v periph/keyswitch_wrap.v periph/lcd_module.v \
-	periph/lcd_subsystem.v periph/sim_socket_block.v \
-	periph/sim_socket_wrap.v periph/sma_wrap.v \
+	periph/lcd_subsystem.v periph/led_mosfet.v periph/led_npn.v \
+	periph/sim_socket_block.v periph/sim_socket_wrap.v periph/sma_wrap.v \
 	top/board.v top/mobile.v \
 	usb/FT2232D_block.v usb/FT2232D_chip.v usb/eeprom_93Cx6_16bit.v \
 	usb/regulator_ic.v usb/regulator_with_caps.v usb/usb_conn.v \
 	usb/usb_core.v usb/usb_domain.v usb/usb_domain_bctl.v \
 	usb/usb_domain_buf.v
 SLOTMAP=slotmap/Q308 slotmap/Q600 slotmap/Q601 slotmap/R295 slotmap/R296 \
-	slotmap/R361 slotmap/U401 slotmap/U705 slotmap/U707
+	slotmap/R361 slotmap/U401 slotmap/U403 slotmap/U705 slotmap/U707
 NETS=	sverp.unet noledb.unet bound.unet
 
 all:	${NETS}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/venus/src/periph/led_mosfet.v	Sat Nov 27 18:34:05 2021 +0000
@@ -0,0 +1,17 @@
+/*
+ * 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/venus/src/periph/led_npn.v	Sat Nov 27 18:34:05 2021 +0000
@@ -0,0 +1,17 @@
+/*
+ * This module captures the circuit for showing the state of a digital signal
+ * on a LED using an NPN transistor instead of a MOSFET, like we did for PWL
+ * on Caramel2.
+ */
+
+module led_npn (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));
+transistor_slot Q (.E(GND), .B(Signal), .C(LED_to_Q));
+
+endmodule
--- a/venus/src/top/mobile.v	Sat Nov 27 07:03:14 2021 +0000
+++ b/venus/src/top/mobile.v	Sat Nov 27 18:34:05 2021 +0000
@@ -150,6 +150,7 @@
 			.VCCS(VCCS),
 			.VBATS(VBATS)
 	);
+
 charging_led chg_led (.VCHG(VCHG), .LEDC(LED_C));
 
 /* Calypso UART inputs */
@@ -198,6 +199,9 @@
 		.PWON(PWON)
 	);
 
+/* indicator LEDs */
+led_mosfet led_PWON (.GND(GND), .VBAT(VBAT), .Signal(ON_nOFF));
+
 /* SIM socket */
 sim_socket_block sim (.GND(GND),
 		      .Vio(Vio),