<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.229th.org/index.php?action=history&amp;feed=atom&amp;title=Shift_Register</id>
		<title>Shift Register - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.229th.org/index.php?action=history&amp;feed=atom&amp;title=Shift_Register"/>
		<link rel="alternate" type="text/html" href="https://wiki.229th.org/index.php?title=Shift_Register&amp;action=history"/>
		<updated>2026-08-14T10:57:58Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.7</generator>

	<entry>
		<id>https://wiki.229th.org/index.php?title=Shift_Register&amp;diff=81&amp;oldid=prev</id>
		<title>WikiSysop: Created page with &quot; Many newcomers to building switch panels get caught up in trying to understand switch matrixes.....until they discover shift registers  ===Switch Matrix===  File:switch_mat...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.229th.org/index.php?title=Shift_Register&amp;diff=81&amp;oldid=prev"/>
				<updated>2020-02-20T06:24:07Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot; Many newcomers to building switch panels get caught up in trying to understand switch matrixes.....until they discover shift registers  ===Switch Matrix===  File:switch_mat...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
Many newcomers to building switch panels get caught up in trying to understand switch matrixes.....until they discover shift registers&lt;br /&gt;
&lt;br /&gt;
===Switch Matrix===&lt;br /&gt;
&lt;br /&gt;
[[File:switch_matrix.png|500px]]&lt;br /&gt;
&lt;br /&gt;
 A shift matrix is basicaly a grid, 2x2, 3x3, 4x4....6x8, 5x7, 8 x 8  (They dont have to have the same number of rows and columns)&lt;br /&gt;
 the benefit is you get the number of switches (a multiple of the two numbers, e.g. in the example above,   4 x 4= 16 buttons)&lt;br /&gt;
 for a meagre use of pins (the sum of the the 2 numbers e.g: 4 + 4 = 8 pins)&lt;br /&gt;
&lt;br /&gt;
'''The Good:''' this a significant reduction of pins required, in this case its half, but that factor is exponentially increase with larger arrays (8x8=64 switches / 8+8=16 pins)&lt;br /&gt;
&lt;br /&gt;
'''The Bad:''' its a complicated wiring process, transferring the logical pinout on the schematic to a physical wiring mesh...&lt;br /&gt;
&lt;br /&gt;
'''The Ugly:''' you need to include individual diodes after each switch to prevent such anomalies as ghosting and masking &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 For further information on understanding Switch Matrix and the issues associated with them read this excellent reference:&lt;br /&gt;
 https://www.dribin.org/dave/keyboard/one_html/&lt;br /&gt;
&lt;br /&gt;
===Shift Register===&lt;br /&gt;
&lt;br /&gt;
Where as a shift register will allow you to connect 8 switches per chip&lt;br /&gt;
&lt;br /&gt;
[[File:74HC165_pinouts.png|300px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These boards have 3 chips so (3 x 8) 24 buttons per board..... and only requires 5 wires coming back to the controller card&lt;br /&gt;
&lt;br /&gt;
[[File:shift_register_wired.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and thats not all, you can daisy chain these shift registers together, and have 2, 3  or 4 connected, (giving you 48, 72 or 96 switches) all running back to your USB controller only on 5 wires to 5 pins.&lt;br /&gt;
&lt;br /&gt;
 Note: a switch matrix would require 20 wires back to 20 pins to achieve the same result&lt;br /&gt;
&lt;br /&gt;
[[File:shift_register_daisy_chained.png|800px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Note: the pro micro controller card has a limit of 96 switches, &lt;br /&gt;
 I tend to limit my panels and wiring to ~64 switches, which is usually ample with still some spare&lt;br /&gt;
&lt;br /&gt;
So the obvious benefit; limited to  just 5 wires;&lt;br /&gt;
&lt;br /&gt;
*using a switch matrix, I'd be limited to a maximum of 6 switches (3x2 matrix)&lt;br /&gt;
&lt;br /&gt;
*utilising a shift register, I'd have a minimum of 24 switches available (3x8 chips) on a single board, (multiplied by as many shift register boards as I had available)&lt;br /&gt;
&lt;br /&gt;
====Wiring====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The other benefit with the shift registers is that there is no need for messy placement of diodes in line to prevent ghosting/masking of switch inputs.&lt;br /&gt;
&lt;br /&gt;
[[File:resnet.png|200px]]&lt;br /&gt;
&lt;br /&gt;
Each chip is located on a board with a Resistor Network, this ensures there is no noise that could be interpreted as (false positive) button inputs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Shared Ground'''&lt;br /&gt;
&lt;br /&gt;
The trick with the shift registers is wiring the shared ground between each set of switches on a particular chip&lt;br /&gt;
&lt;br /&gt;
[[File:ground.png|400px]]&lt;br /&gt;
&lt;br /&gt;
there are 8 inputs on each chip on the shift register board (in the example above D0 - D7)&lt;br /&gt;
but there is only one Ground&lt;br /&gt;
&lt;br /&gt;
[[File:Shift_register.png|400px]]&lt;br /&gt;
&lt;br /&gt;
therefore you must daisy chain all the ground pins on the 8 switches connected to this chip together and then connect them to the Ground pin (on a single bus)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
e.g. in the example board above, simple wire each of the wires to a switch, then wire all the grounds from each switch together&lt;br /&gt;
&lt;br /&gt;
[[File:wiring.png|400px]]&lt;br /&gt;
&lt;br /&gt;
now connect the ground (blue wire pictured in this instance) to one of those joined ground switches ....jobs done&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:shared_ground.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Each of the 3 chips on the shift register board are the same, 8 switches, single ground, wire ground pins on all 8 switches together, then back to single ground on the chip.&lt;br /&gt;
&lt;br /&gt;
Shift Registers are by far the simplest method of connecting multiple switches on DIY panels for less than US$10, accompanied with MMJoy2 on a ATMega32U4 chip controller card, like the generic Pro Micro (less than US$5), it is by far the most cost effective.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Flash the Pro Micro to run BIOS for use with the MMJoy software, will  make configuration and usage MUCH simpler for newbies.&lt;br /&gt;
&lt;br /&gt;
[[File:MMjoy.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Remember:  &amp;quot;when soldering  - don't be on fire&amp;quot;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>	</entry>

	</feed>