diff venus/src/periph/charging_circuit.v @ 32:85fbd582af88

Venus src: charging circuit captured
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 21 Nov 2021 20:20:38 +0000
parents
children 1d2b57d4f1c9
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/venus/src/periph/charging_circuit.v	Sun Nov 21 20:20:38 2021 +0000
@@ -0,0 +1,26 @@
+/*
+ * This module encapsulates the battery charging circuit.
+ */
+
+module charging_circuit (GND, VCHG, VBAT, ICTL, PCHG, VCCS, VBATS);
+
+input GND, VCHG;
+inout VBAT;
+
+input ICTL, PCHG;
+output VCCS, VBATS;
+
+wire mid;
+
+Si9407AEY Q401 (.G(ICTL), .S(VCHG), .D(mid));
+capacitor C401 (ICTL, VCHG);
+
+resistor Rprech (PCHG, mid);
+
+misc_diode D404 (.A(mid), .C(VCCS));
+
+resistor Rmeas (VCCS, VBATS);
+
+starpoint VBATS_join (VBAT, VBATS);
+
+endmodule