Line up the Diodes in a 8x8 grid.
The anodes are connected to the rows and the cathodes are connected to the columns.
The rows and columns are connected to the microcontroller.
The microcontroller can then scan the rows and columns to determine which switches are pressed.
Schematic
Grid R2 8x8
R6 R5 R4 R3 R2 R1 C6 C5 C4 C3 C2 C1 1N4007W R1C6 1 1 2 2 1N4007W R1C5 1 1 2 2 1N4007W R1C4 1 1 2 2 1N4007W R1C3 1 1 2 2 1N4007W R1C2 1 1 2 2 1N4007W R1C1 1 1 2 2 1N4007W R2C6 1 1 2 2 1N4007W R2C5 1 1 2 2 1N4007W R2C4 1 1 2 2 1N4007W R2C3 1 1 2 2 1N4007W R2C2 1 1 2 2 1N4007W R2C1 1 1 2 2 1N4007W R3C6 1 1 2 2 1N4007W R3C5 1 1 2 2 1N4007W R3C4 1 1 2 2 1N4007W R3C3 1 1 2 2 1N4007W R3C2 1 1 2 2 1N4007W R3C1 1 1 2 2 1N4007W R4C6 1 1 2 2 1N4007W R4C5 1 1 2 2 1N4007W R4C4 1 1 2 2 1N4007W R4C3 1 1 2 2 1N4007W R4C2 1 1 2 2 1N4007W R4C1 1 1 2 2 1N4007W R5C6 1 1 2 2 1N4007W R5C5 1 1 2 2 1N4007W R5C4 1 1 2 2 1N4007W R5C3 1 1 2 2 1N4007W R5C2 1 1 2 2 1N4007W R5C1 1 1 2 2 1N4007W R6C6 1 1 2 2 1N4007W R6C5 1 1 2 2 1N4007W R6C4 1 1 2 2 1N4007W R6C3 1 1 2 2 1N4007W R6C2 1 1 2 2 1N4007W R6C1 1 1 2 2 A A1 A A B B C C D D 1 1 2 2 3 3 4 4 5 5 TITLE: Matrix Grid 8x8 REV: 2.0 Date: 2023-06-11 Sheet: 1/2 Drawn By: dxbang Company: Bang Systems R1 C11 R1 R1 R1 R1 R1 C21 C31 C41 C51 C61 R2 R2 R2 R2 R2 R2 R3 R3 R3 R3 R3 R3 R4 R4 R4 R4 R4 R4 R5 R5 R5 R5 R5 R5 R6 R6 R6 R6 R6 R6 C12 C22 C32 C42 C52 C62 C13 C23 C33 C43 C53 C63 C14 C24 C34 C44 C54 C64 C15 C25 C35 C45 C55 C65 C16 C26 C36 C46 C56 C66 C86 C76 C85 C75 C84 C74 C83 C73 C82 C72 R6 R6 R5 R5 R4 R4 R3 R3 R2 R2 C81 C71 R1 R1 1N4007W R6C7 1 1 2 2 1N4007W R6C8 1 1 2 2 1N4007W R5C7 1 1 2 2 1N4007W R5C8 1 1 2 2 1N4007W R4C7 1 1 2 2 1N4007W R4C8 1 1 2 2 1N4007W R3C7 1 1 2 2 1N4007W R3C8 1 1 2 2 1N4007W R2C7 1 1 2 2 1N4007W R2C8 1 1 2 2 1N4007W R1C7 1 1 2 2 1N4007W R1C8 1 1 2 2 C7 C8 1N4007W R7C8 1 1 2 2 1N4007W R7C7 1 1 2 2 1N4007W R8C8 1 1 2 2 1N4007W R8C7 1 1 2 2 R7 R7 R8 R8 C77 C87 C78 C88 C68 C58 C48 C38 C28 C18 C67 C57 C47 C37 C27 C17 R8 R8 R8 R8 R8 R8 R7 R7 R7 R7 R7 R7 1N4007W R8C1 1 1 2 2 1N4007W R8C2 1 1 2 2 1N4007W R8C3 1 1 2 2 1N4007W R8C4 1 1 2 2 1N4007W R8C5 1 1 2 2 1N4007W R8C6 1 1 2 2 1N4007W R7C1 1 1 2 2 1N4007W R7C2 1 1 2 2 1N4007W R7C3 1 1 2 2 1N4007W R7C4 1 1 2 2 1N4007W R7C5 1 1 2 2 1N4007W R7C6 1 1 2 2 R7 R8 Grid 8x8 Headers
A A A A B B C C D D 1 1 2 2 3 3 4 4 5 5 TITLE: Matrix Grid 8x8 Grouping REV: 2.0 Date: 2023-06-27 Sheet: 2/2 Drawn By: dxbang Company: Bang Systems X5521WV-2X08-C46D46-1220 ARD 1 1 16 16 3 3 14 14 5 5 12 12 7 7 10 10 9 9 8 8 11 11 6 6 13 13 4 4 15 15 2 2 R8 R8 R8 R8 R8 R8 C86 C85 C84 C83 C82 C81 R7 R7 R7 R7 R7 R7 C76 C75 C74 C73 C72 C71 R6 R6 R6 R6 R6 R6 C66 C65 C64 C63 C62 C61 R5 R5 R5 R5 R5 R5 C56 C55 C54 C53 C52 C51 R4 R4 R4 R4 R4 R4 C46 C45 C44 C43 C42 C41 R3 R3 R3 R3 R3 R3 C31 C32 C33 C34 C35 C36 R2 R2 R2 R2 R2 R2 C26 C25 C24 C23 C22 C21 R1 R1 R1 R1 R1 R1 C16 C15 C14 C13 C12 C11 X5521WV-2X08-C46D46-1220 H1 1 1 16 16 3 3 14 14 5 5 12 12 7 7 10 10 9 9 8 8 11 11 6 6 13 13 4 4 15 15 2 2 X5521WV-2X08-C46D46-1220 H2 1 1 16 16 3 3 14 14 5 5 12 12 7 7 10 10 9 9 8 8 11 11 6 6 13 13 4 4 15 15 2 2 X5521WV-2X08-C46D46-1220 H3 1 1 16 16 3 3 14 14 5 5 12 12 7 7 10 10 9 9 8 8 11 11 6 6 13 13 4 4 15 15 2 2 X5521WV-2X08-C46D46-1220 H4 1 1 16 16 3 3 14 14 5 5 12 12 7 7 10 10 9 9 8 8 11 11 6 6 13 13 4 4 15 15 2 2 X5521WV-2X08-C46D46-1220 H5 1 1 16 16 3 3 14 14 5 5 12 12 7 7 10 10 9 9 8 8 11 11 6 6 13 13 4 4 15 15 2 2 X5521WV-2X08-C46D46-1220 H6 1 1 16 16 3 3 14 14 5 5 12 12 7 7 10 10 9 9 8 8 11 11 6 6 13 13 4 4 15 15 2 2 X5521WV-2X08-C46D46-1220 H7 1 1 16 16 3 3 14 14 5 5 12 12 7 7 10 10 9 9 8 8 11 11 6 6 13 13 4 4 15 15 2 2 X5521WV-2X08-C46D46-1220 H8 1 1 16 16 3 3 14 14 5 5 12 12 7 7 10 10 9 9 8 8 11 11 6 6 13 13 4 4 15 15 2 2 R1 R1 C17 C18 C27 C28 C37 C38 C47 C48 C87 C88 C77 C78 C67 C68 C57 C58 R2 R2 R3 R3 R4 R4 R5 R5 R6 R6 R7 R7 R8 R8 R1 R2 R3 R4 R5 R6 R7 R8 C6 C8 C7 C5 C4 C3 C2 C1