FreeCalypso > hg > freecalypso-schem2
changeset 51:9de8e7a43160
keypad initial implementation
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 27 Nov 2021 07:03:14 +0000 |
parents | 3dbe73bbc0a4 |
children | 06e95ff0023b |
files | venus/doc/Keypad-layout venus/src/MCL venus/src/Makefile venus/src/periph/keypad.v venus/src/top/mobile.v |
diffstat | 5 files changed, 199 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/venus/doc/Keypad-layout Sat Nov 27 07:03:14 2021 +0000 @@ -0,0 +1,50 @@ +FreeCalypso Venus will have the same 21-button main keypad as on TI's D-Sample +development platform, as seen in this photograph: + +https://www.freecalypso.org/members/falcon/pictures/D-Sample/pic1.jpeg + +Each of these 21 buttons forming the main keypad underneath the LCD will be an +E-Switch TL3301 series SMT tactile switch, mounted directly on the top side of +FC Venus board. The following reference designators are assigned to these 21 +tactile switches: + +S401 [LS] S402 [^] S403 [RS] +S404 [<-] S405 [.] S406 [->] +S407 [Green] S408 [V] S409 [Red] + +S410 [1] S411 [2] S412 [3] +S413 [4] S414 [5] S415 [6] +S416 [7] S417 [8] S418 [9] +S419 [*] S420 [0] S421 [#] + +The label in square brackets indicates logical function: + +* [Green] and [Red] are the green call key (traditionally called SEND) and the + red power/hang-up key (traditionally called END). + +* [LS] and [RS] are the left and right "soft function" keys, above [Green] and + [Red] and directly below the LCD. + +* S402, S404, S405, S406 and S408 form the 5-way navigation button group (S405 + is "center"); their [] labels are an ASCII art attempt to depict navigation + key directions. + +* S410 through S421 form the most traditional 12-button dial keypad. + +In addition to these 21 tactile switches forming the main keypad, there will be +3 additional tactile switches of the same type corresponding to the 3 side +buttons on D-Sample: + +S422 Left side button: volume up +S423 Left side button: volume down +S424 Right side button, function unspecified + +S422 and S423 will need to be placed on the left side of our LCD; S424 will need +to be placed to the right of our LCD. + +S409 will be connected between PWON and GND and thus exist outside of KBC/KBR +matrix. Each of the remaining 23 keyswitches will short across a KBC/KBR pair. +Calypso provides 5 KBC and 5 KBR lines, allowing for up to 25 keyswitches, thus +enough for our 23. The choice of which KBC/KBR crosspoint should be used for +which button position is up to the PCB layout engineer - the source file to be +edited is src/periph/keypad.v.
--- a/venus/src/MCL Sat Nov 27 04:43:53 2021 +0000 +++ b/venus/src/MCL Sat Nov 27 07:03:14 2021 +0000 @@ -1126,6 +1126,102 @@ vendor_part_number=TL3301EF160QJCT-ND npins=4 +S401: + part=keypad-switch + hier=mob.keypad.S401.pkg + +S402: + part=keypad-switch + hier=mob.keypad.S402.pkg + +S403: + part=keypad-switch + hier=mob.keypad.S403.pkg + +S404: + part=keypad-switch + hier=mob.keypad.S404.pkg + +S405: + part=keypad-switch + hier=mob.keypad.S405.pkg + +S406: + part=keypad-switch + hier=mob.keypad.S406.pkg + +S407: + part=keypad-switch + hier=mob.keypad.S407.pkg + +S408: + part=keypad-switch + hier=mob.keypad.S408.pkg + +S409: + part=keypad-switch + hier=mob.keypad.S409.pkg + +S410: + part=keypad-switch + hier=mob.keypad.S410.pkg + +S411: + part=keypad-switch + hier=mob.keypad.S411.pkg + +S412: + part=keypad-switch + hier=mob.keypad.S412.pkg + +S413: + part=keypad-switch + hier=mob.keypad.S413.pkg + +S414: + part=keypad-switch + hier=mob.keypad.S414.pkg + +S415: + part=keypad-switch + hier=mob.keypad.S415.pkg + +S416: + part=keypad-switch + hier=mob.keypad.S416.pkg + +S417: + part=keypad-switch + hier=mob.keypad.S417.pkg + +S418: + part=keypad-switch + hier=mob.keypad.S418.pkg + +S419: + part=keypad-switch + hier=mob.keypad.S419.pkg + +S420: + part=keypad-switch + hier=mob.keypad.S420.pkg + +S421: + part=keypad-switch + hier=mob.keypad.S421.pkg + +S422: + part=keypad-switch + hier=mob.keypad.S422.pkg + +S423: + part=keypad-switch + hier=mob.keypad.S423.pkg + +S424: + part=keypad-switch + hier=mob.keypad.S424.pkg + # charging power slide switch S701: hier=chg_switch
--- a/venus/src/Makefile Sat Nov 27 04:43:53 2021 +0000 +++ b/venus/src/Makefile Sat Nov 27 07:03:14 2021 +0000 @@ -12,8 +12,9 @@ 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/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/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 \ 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/keypad.v Sat Nov 27 07:03:14 2021 +0000 @@ -0,0 +1,43 @@ +/* + * This Verilog module encapsulates the keypad of FC Venus. + * + * As currently implemented, KBC/KBR crosspoint choices correspond + * to TI's D-Sample, but they can be freely changed by the PCB layout + * engineer by editing this Verilog module and regenerating the netlist. + */ + +module keypad (GND, KBC, KBR, PWON); + +input GND; +input [4:0] KBC; +output [4:0] KBR; +output PWON; + +keyswitch_wrap S401 (KBC[3], KBR[0]); /* left soft key */ +keyswitch_wrap S402 (KBC[4], KBR[2]); /* navigation up */ +keyswitch_wrap S403 (KBC[3], KBR[2]); /* right soft key */ +keyswitch_wrap S404 (KBC[4], KBR[0]); /* navigation left */ +keyswitch_wrap S405 (KBC[4], KBR[4]); /* navigation center */ +keyswitch_wrap S406 (KBC[4], KBR[1]); /* navigation right */ +keyswitch_wrap S407 (KBC[0], KBR[0]); /* green CALL or SEND button */ +keyswitch_wrap S408 (KBC[4], KBR[3]); /* navigation down */ +keyswitch_wrap S410 (KBC[0], KBR[1]); /* 1 */ +keyswitch_wrap S411 (KBC[1], KBR[1]); /* 2 */ +keyswitch_wrap S412 (KBC[2], KBR[1]); /* 3 */ +keyswitch_wrap S413 (KBC[0], KBR[2]); /* 4 */ +keyswitch_wrap S414 (KBC[1], KBR[2]); /* 5 */ +keyswitch_wrap S415 (KBC[2], KBR[2]); /* 6 */ +keyswitch_wrap S416 (KBC[0], KBR[3]); /* 7 */ +keyswitch_wrap S417 (KBC[1], KBR[3]); /* 8 */ +keyswitch_wrap S418 (KBC[2], KBR[3]); /* 9 */ +keyswitch_wrap S419 (KBC[0], KBR[4]); /* * */ +keyswitch_wrap S420 (KBC[1], KBR[4]); /* 0 */ +keyswitch_wrap S421 (KBC[2], KBR[4]); /* # */ +keyswitch_wrap S422 (KBC[2], KBR[0]); /* volume up */ +keyswitch_wrap S423 (KBC[1], KBR[0]); /* volume down */ +keyswitch_wrap S424 (KBC[3], KBR[1]); /* right side button */ + +/* The button in the "red" position is special: it is PWON */ +keyswitch_wrap S409 (PWON, GND); + +endmodule;
--- a/venus/src/top/mobile.v Sat Nov 27 04:43:53 2021 +0000 +++ b/venus/src/top/mobile.v Sat Nov 27 07:03:14 2021 +0000 @@ -191,6 +191,13 @@ .BL_GPIO12(BL_GPIO12) ); +/* keypad */ +keypad keypad ( .GND(GND), + .KBC(KBC), + .KBR(KBR), + .PWON(PWON) + ); + /* SIM socket */ sim_socket_block sim (.GND(GND), .Vio(Vio),