changeset 63:4a7db02ddd3e

buzzer circuit implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 01 Dec 2021 20:22:47 +0000
parents a1b55af7f04d
children 82febe124936
files venus/src/MCL venus/src/Makefile venus/src/periph/buzzer_circuit.v venus/src/periph/transistor_ext_bias.v venus/src/top/mobile.v
diffstat 5 files changed, 48 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/venus/src/MCL	Wed Dec 01 19:26:29 2021 +0000
+++ b/venus/src/MCL	Wed Dec 01 20:22:47 2021 +0000
@@ -652,6 +652,7 @@
 
 # Clamping diode pair in the buzzer driving circuit
 D405:
+ hier=mob.buz.D_pair
  manufacturer=Diotec Semiconductor
  manufacturer_part_number=BAV99W
  description=Clamping diode pair, SOT-323
@@ -847,6 +848,7 @@
 # Old-style buzzer
 
 LS401:
+ hier=mob.buz.buz.pkg
  manufacturer=CUI
  manufacturer_part_number=CMT-8530S-SMT-TR
  description=Magnetic buzzer, 8.5x8.5 mm, SMT
@@ -921,6 +923,7 @@
 
 # Mighty NPN transistor for driving the magnetic buzzer
 Q405:
+ hier=mob.buz.npn.Q
  manufacturer=Rohm
  manufacturer_part_number=2SD2114KT146V
  description=Medium power NPN transistor, SMT3/SC-59
@@ -1181,12 +1184,14 @@
 
 # external base resistor for Q405
 R418:
+ hier=mob.buz.npn.Rbase
  value=750R
  footprint=0402
  npins=2
 
 # external B-E resistor for Q405
 R419:
+ hier=mob.buz.npn.Rbe
  value=22k
  footprint=0402
  npins=2
--- a/venus/src/Makefile	Wed Dec 01 19:26:29 2021 +0000
+++ b/venus/src/Makefile	Wed Dec 01 20:22:47 2021 +0000
@@ -9,14 +9,15 @@
 	core/rita_rf_chip.v core/rita_vcxo_int.v core/rita_wrap.v \
 	core/xtal_32khz_wrap.v \
 	periph/MAX1916.v periph/Si9407AEY.v periph/audio_main.v \
-	periph/audio_hso.v periph/battery.v periph/buzzer_wrap.v \
-	periph/bl_current_select.v periph/bl_current_sink.v \
-	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/led_mosfet.v periph/led_npn.v \
-	periph/loudspeaker.v periph/sim_socket_block.v periph/sim_socket_wrap.v\
-	periph/sma_wrap.v periph/trrs_jack.v \
+	periph/audio_hso.v periph/battery.v periph/buzzer_circuit.v \
+	periph/buzzer_wrap.v periph/bl_current_select.v \
+	periph/bl_current_sink.v 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/led_mosfet.v periph/led_npn.v periph/loudspeaker.v \
+	periph/sim_socket_block.v periph/sim_socket_wrap.v periph/sma_wrap.v \
+	periph/transistor_ext_bias.v periph/trrs_jack.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 \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/venus/src/periph/buzzer_circuit.v	Wed Dec 01 20:22:47 2021 +0000
@@ -0,0 +1,14 @@
+module buzzer_circuit (GND, VBAT, Digital_input);
+
+input GND, VBAT;
+input Digital_input;
+
+wire Buzzer_neg;
+
+buzzer_wrap buz (.Pos(VBAT), .Neg(Buzzer_neg));
+
+clamp_diode_pair D_pair (.Signal(Buzzer_neg), .Pos_rail(VBAT), .Neg_rail(GND));
+
+transistor_ext_bias npn (.E(GND), .B(Digital_input), .C(Buzzer_neg));
+
+endmodule
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/venus/src/periph/transistor_ext_bias.v	Wed Dec 01 20:22:47 2021 +0000
@@ -0,0 +1,14 @@
+/* transistor with external bias resistors */
+
+module transistor_ext_bias (E, B, C);
+
+inout E, B, C;
+
+wire int_base;
+
+transistor_slot Q (.E(E), .B(int_base), .C(C));
+
+resistor Rbase (B, int_base);
+resistor Rbe (int_base, E);
+
+endmodule
--- a/venus/src/top/mobile.v	Wed Dec 01 19:26:29 2021 +0000
+++ b/venus/src/top/mobile.v	Wed Dec 01 20:22:47 2021 +0000
@@ -230,6 +230,12 @@
 		  .GPIO_enable(GPIO1_SPKR)
 	);
 
+/* old-style buzzer */
+buzzer_circuit buz (.GND(GND),
+		    .VBAT(VBAT),
+		    .Digital_input(BU_PWT)
+	);
+
 /* SIM socket */
 sim_socket_block sim (.GND(GND),
 		      .Vio(Vio),