# HG changeset patch # User Mychaela Falconia # Date 1637978986 0 # Node ID 9f5a3567d69931adaf653fb28c4524abb5804cd6 # Parent c247abb89302ae92c19a7f73a24efc6a08765300 progress toward LCD integration diff -r c247abb89302 -r 9f5a3567d699 venus/src/Makefile --- a/venus/src/Makefile Sat Nov 27 01:43:32 2021 +0000 +++ b/venus/src/Makefile Sat Nov 27 02:09:46 2021 +0000 @@ -9,6 +9,7 @@ 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/battery.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/lcd_module.v periph/sim_socket_block.v periph/sim_socket_wrap.v \ diff -r c247abb89302 -r 9f5a3567d699 venus/src/periph/bl_current_select.v --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/venus/src/periph/bl_current_select.v Sat Nov 27 02:09:46 2021 +0000 @@ -0,0 +1,24 @@ +module bl_current_select (GND, Vio, BL_GPIO11, BL_GPIO12, SET); + +input GND, Vio; +input BL_GPIO11, BL_GPIO12; +output SET; + +wire buf_out_GPIO11, buf_out_GPIO12; + +/* U403 buffer common part */ +logic_ic_common U403_common (.Vcc(Vio), .GND(GND)); + +/* bypass capacitor */ +capacitor U403_bypass (Vio, GND); + +/* buffer slots */ +buffer_slot_3state buf_GPIO11 (.A(Vio), .nOE(BL_GPIO11), .Y(buf_out_GPIO11)); +buffer_slot_3state buf_GPIO12 (.A(Vio), .nOE(BL_GPIO12), .Y(buf_out_GPIO12)); + +/* MAX1916 current control resistors */ +resistor R_fixed (Vio, SET); +resistor R_GPIO11 (buf_out_GPIO11, SET); +resistor R_GPIO12 (buf_out_GPIO12, SET); + +endmodule diff -r c247abb89302 -r 9f5a3567d699 venus/src/periph/bl_current_sink.v --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/venus/src/periph/bl_current_sink.v Sat Nov 27 02:09:46 2021 +0000 @@ -0,0 +1,22 @@ +module bl_current_sink (GND, Vio, BL_GPIO9, BL_GPIO11, BL_GPIO12, LEDK); + +input GND, Vio; +input BL_GPIO9, BL_GPIO11, BL_GPIO12; +output [1:3] LEDK; + +wire SET; + +MAX1916 MAX1916 (.GND(GND), + .EN(BL_GPIO9), + .SET(SET), + .LEDK(LEDK) + ); + +bl_current_select cursel (.GND(GND), + .Vio(Vio), + .BL_GPIO11(BL_GPIO11), + .BL_GPIO12(BL_GPIO12), + .SET(SET) + ); + +endmodule