nanoFramework.Iot.Device.Sn74hc595 1.2.907

Prefix Reserved
dotnet add package nanoFramework.Iot.Device.Sn74hc595 --version 1.2.907
                    
NuGet\Install-Package nanoFramework.Iot.Device.Sn74hc595 -Version 1.2.907
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nanoFramework.Iot.Device.Sn74hc595" Version="1.2.907" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.Iot.Device.Sn74hc595" Version="1.2.907" />
                    
Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.Sn74hc595" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add nanoFramework.Iot.Device.Sn74hc595 --version 1.2.907
                    
#r "nuget: nanoFramework.Iot.Device.Sn74hc595, 1.2.907"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package nanoFramework.Iot.Device.Sn74hc595@1.2.907
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=nanoFramework.Iot.Device.Sn74hc595&version=1.2.907
                    
Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.Sn74hc595&version=1.2.907
                    
Install as a Cake Tool

SN74HC595 -- 8-bit shift register

SN74HC595 is a 8-bit shift register. Per the datasheet, the SN74HC595 is a "8-Bit Shift Register With 3-State Output Register". The Sn74hc595 binding is based on and is compatible with the more general ShiftRegister binding. The Sn74hc595 binding adds the ability clear the storage register with a single pin. Either binding can be used to control the SN74HC595.

shift-register

The binding abstracts the interaction with the data register, the register clock and other shift register capabilities. The binding enables interaction via GPIO or SPI.

Documentation

Usage

The following example code demonstrates how to use the SN74HC595 with its most basic functions.

Sn74hc595 sr = new(Sn74hc595PinMapping.Minimal);

// Light up three of first four LEDs
sr.ShiftBit(1);
sr.ShiftBit(1);
sr.ShiftBit(0);
sr.ShiftBit(1);
sr.Latch();

// Display for 1s
Thread.Sleep(1000);

// Write to all 8 registers with a byte value
// ShiftByte latches data by default
sr.ShiftByte(0b_1000_1101);

The following diagram demonstrates the required wiring for the Minimal pin mapping. In particular, OE must be wired to ground, and SRCLR must be wired high.

SN74HC595 Minimal pin mapping

The following example demonstrates using additional features and requires different wiring.

Sn74hc595 sr = new(Sn74hc595PinMapping.Complete);

// Write to all 8 registers with a byte value
// ShiftByte latches data by default
sr.ShiftByte(0b_1000_1101);

// Display for 1s
Thread.Sleep(1000);

// disable output temporarily
sr.OutputEnable = false;

// Display for 1s
Thread.Sleep(1000);

// re-enable output
sr.OutputEnable = true;

// clear storage before writing new values
sr.ClearStorage();

// Light up three of first four LEDs
sr.ShiftBit(1);
sr.ShiftBit(1);
sr.ShiftBit(0);
sr.ShiftBit(1);
sr.Latch();

The following diagram demonstrates the required wiring for the Complete pin mapping.

SN74HC595 Minimal pin mapping

If you want to use SPI, see the ShiftRegister binding, which includes more information on SPI.

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.907 166 10/2/2025
1.2.869 245 4/2/2025
1.2.864 223 4/2/2025
1.2.852 233 3/11/2025
1.2.835 191 2/27/2025
1.2.833 177 2/27/2025
1.2.829 175 2/27/2025
1.2.822 176 2/26/2025
1.2.775 171 2/4/2025
1.2.772 166 2/4/2025
1.2.767 170 2/3/2025
1.2.762 200 2/1/2025
1.2.759 171 1/31/2025
1.2.755 189 1/31/2025
1.2.737 188 1/13/2025
1.2.718 170 12/30/2024
1.2.704 162 12/18/2024
1.2.696 169 12/16/2024
1.2.673 187 10/23/2024
1.2.635 200 8/30/2024
1.2.631 191 8/28/2024
1.2.590 186 7/17/2024
1.2.570 209 6/14/2024
1.2.560 204 5/29/2024
1.2.548 193 5/15/2024
1.2.436 582 11/10/2023
1.2.416 402 11/8/2023
1.2.329 711 5/26/2023
1.2.313 640 5/12/2023
1.2.302 708 5/10/2023
1.2.297 679 5/3/2023
1.2.273 725 3/17/2023
1.2.203 833 12/28/2022
1.2.159 916 11/14/2022
1.2.158 927 11/13/2022
1.2.153 884 11/5/2022
1.2.141 941 10/25/2022
1.2.122 1,007 10/12/2022
1.2.114 919 10/8/2022
1.2.104 956 9/24/2022
1.2.95 987 9/22/2022
1.2.87 1,025 9/15/2022
1.2.73 962 9/8/2022
1.2.5 995 7/13/2022
1.1.141.41205 1,012 7/6/2022
1.1.116.8772 1,009 6/24/2022
1.1.113.2032 912 6/23/2022
1.1.58.10097 988 5/23/2022
1.1.27 955 4/26/2022
1.1.20 981 4/21/2022
1.1.3 1,034 4/15/2022
1.1.1 979 4/14/2022
1.0.277-preview.128 218 3/26/2022
1.0.277-preview.126 216 3/25/2022
1.0.277-preview.125 217 3/25/2022
1.0.277-preview.113 214 3/20/2022
1.0.277-preview.112 215 3/19/2022
1.0.277-preview.103 224 3/14/2022
1.0.277-preview.102 219 3/11/2022
1.0.277-preview.99 229 3/10/2022
1.0.277-preview.85 219 2/25/2022
1.0.277-preview.60 241 2/4/2022
1.0.277-preview.32 241 1/27/2022
1.0.277-preview.17 228 1/24/2022
1.0.277-preview.1 238 1/11/2022
1.0.259 950 12/9/2021
1.0.218 300 10/18/2021
1.0.155 274 8/31/2021
1.0.148 264 7/22/2021
1.0.105 376 5/29/2021
1.0.70 299 5/26/2021