nanoFramework.Iot.Device.Sn74hc595
1.2.696
Prefix Reserved
See the version list below for details.
dotnet add package nanoFramework.Iot.Device.Sn74hc595 --version 1.2.696
NuGet\Install-Package nanoFramework.Iot.Device.Sn74hc595 -Version 1.2.696
<PackageReference Include="nanoFramework.Iot.Device.Sn74hc595" Version="1.2.696" />
paket add nanoFramework.Iot.Device.Sn74hc595 --version 1.2.696
#r "nuget: nanoFramework.Iot.Device.Sn74hc595, 1.2.696"
// Install nanoFramework.Iot.Device.Sn74hc595 as a Cake Addin #addin nuget:?package=nanoFramework.Iot.Device.Sn74hc595&version=1.2.696 // Install nanoFramework.Iot.Device.Sn74hc595 as a Cake Tool #tool nuget:?package=nanoFramework.Iot.Device.Sn74hc595&version=1.2.696
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.
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.
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.
If you want to use SPI, see the ShiftRegister
binding, which includes more information on SPI.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
-
- nanoFramework.CoreLibrary (>= 1.15.5)
- nanoFramework.Iot.Device.Multiplexing (>= 1.2.693)
- nanoFramework.Iot.Device.ShiftRegister (>= 1.2.671)
- nanoFramework.Runtime.Events (>= 1.11.18)
- nanoFramework.System.Device.Gpio (>= 1.1.41)
- nanoFramework.System.Device.Spi (>= 1.3.52)
- nanoFramework.System.Threading (>= 1.1.32)
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.704 | 69 | 12/18/2024 |
1.2.696 | 73 | 12/16/2024 |
1.2.673 | 93 | 10/23/2024 |
1.2.635 | 115 | 8/30/2024 |
1.2.631 | 112 | 8/28/2024 |
1.2.590 | 105 | 7/17/2024 |
1.2.570 | 124 | 6/14/2024 |
1.2.560 | 115 | 5/29/2024 |
1.2.548 | 111 | 5/15/2024 |
1.2.436 | 526 | 11/10/2023 |
1.2.416 | 355 | 11/8/2023 |
1.2.329 | 611 | 5/26/2023 |
1.2.313 | 544 | 5/12/2023 |
1.2.302 | 619 | 5/10/2023 |
1.2.297 | 590 | 5/3/2023 |
1.2.273 | 638 | 3/17/2023 |
1.2.203 | 740 | 12/28/2022 |
1.2.159 | 813 | 11/14/2022 |
1.2.158 | 831 | 11/13/2022 |
1.2.153 | 787 | 11/5/2022 |
1.2.141 | 838 | 10/25/2022 |
1.2.122 | 904 | 10/12/2022 |
1.2.114 | 819 | 10/8/2022 |
1.2.104 | 855 | 9/24/2022 |
1.2.95 | 881 | 9/22/2022 |
1.2.87 | 916 | 9/15/2022 |
1.2.73 | 856 | 9/8/2022 |
1.2.5 | 887 | 7/13/2022 |
1.1.141.41205 | 902 | 7/6/2022 |
1.1.116.8772 | 905 | 6/24/2022 |
1.1.113.2032 | 804 | 6/23/2022 |
1.1.58.10097 | 875 | 5/23/2022 |
1.1.27 | 844 | 4/26/2022 |
1.1.20 | 854 | 4/21/2022 |
1.1.3 | 906 | 4/15/2022 |
1.1.1 | 861 | 4/14/2022 |
1.0.277-preview.128 | 125 | 3/26/2022 |
1.0.277-preview.126 | 126 | 3/25/2022 |
1.0.277-preview.125 | 124 | 3/25/2022 |
1.0.277-preview.113 | 121 | 3/20/2022 |
1.0.277-preview.112 | 123 | 3/19/2022 |
1.0.277-preview.103 | 126 | 3/14/2022 |
1.0.277-preview.102 | 124 | 3/11/2022 |
1.0.277-preview.99 | 133 | 3/10/2022 |
1.0.277-preview.85 | 126 | 2/25/2022 |
1.0.277-preview.60 | 142 | 2/4/2022 |
1.0.277-preview.32 | 138 | 1/27/2022 |
1.0.277-preview.17 | 137 | 1/24/2022 |
1.0.277-preview.1 | 140 | 1/11/2022 |
1.0.259 | 828 | 12/9/2021 |
1.0.218 | 201 | 10/18/2021 |
1.0.155 | 174 | 8/31/2021 |
1.0.148 | 168 | 7/22/2021 |
1.0.105 | 280 | 5/29/2021 |
1.0.70 | 198 | 5/26/2021 |