diff --git a/Projects/IO Expander/Microchip/Microchip.csproj b/Projects/IO Expander/Microchip/Microchip.csproj
new file mode 100644
index 0000000..1306559
--- /dev/null
+++ b/Projects/IO Expander/Microchip/Microchip.csproj
@@ -0,0 +1,73 @@
+
+
+
+
+
+ Debug
+ AnyCPU
+ {40EE1C99-A152-4AF9-ADCE-453967FEA98A}
+ Exe
+ Microchip
+ Microchip
+ v4.5.2
+ 512
+ true
+ {A1948822-69DD-4150-919B-F3F42EFB71CC};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 9
+
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+ ..\..\..\..\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Gpio\bin\Debug\GHIElectronics.TinyCLR.Devices.Gpio.dll
+
+
+ ..\..\..\..\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.I2c\bin\Debug\GHIElectronics.TinyCLR.Devices.I2c.dll
+
+
+ ..\..\..\..\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Spi\bin\Debug\GHIElectronics.TinyCLR.Devices.Spi.dll
+
+
+ ..\..\..\..\TinyCLR-Drivers\Microchip\Mcp23xxx\GHIElectronics.TinyCLR.Drivers.Microchip.Mcp23xxx\bin\Debug\GHIElectronics.TinyCLR.Drivers.Microchip.Mcp23xxx.dll
+
+
+ packages\GHIElectronics.TinyCLR.Native.2.1.0\lib\net452\GHIElectronics.TinyCLR.Native.dll
+
+
+ packages\GHIElectronics.TinyCLR.Pins.2.1.0\lib\net452\GHIElectronics.TinyCLR.Pins.dll
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
\ No newline at end of file
diff --git a/Projects/IO Expander/Microchip/Microchip.sln b/Projects/IO Expander/Microchip/Microchip.sln
new file mode 100644
index 0000000..7bc9bf4
--- /dev/null
+++ b/Projects/IO Expander/Microchip/Microchip.sln
@@ -0,0 +1,27 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31424.327
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microchip", "Microchip.csproj", "{40EE1C99-A152-4AF9-ADCE-453967FEA98A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {40EE1C99-A152-4AF9-ADCE-453967FEA98A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {40EE1C99-A152-4AF9-ADCE-453967FEA98A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {40EE1C99-A152-4AF9-ADCE-453967FEA98A}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {40EE1C99-A152-4AF9-ADCE-453967FEA98A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {40EE1C99-A152-4AF9-ADCE-453967FEA98A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {40EE1C99-A152-4AF9-ADCE-453967FEA98A}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {0CFB69D5-28BC-4BAE-9E7D-8D5523B5CDB1}
+ EndGlobalSection
+EndGlobal
diff --git a/Projects/IO Expander/Microchip/Program.cs b/Projects/IO Expander/Microchip/Program.cs
new file mode 100644
index 0000000..0ea88cb
--- /dev/null
+++ b/Projects/IO Expander/Microchip/Program.cs
@@ -0,0 +1,78 @@
+using System;
+using System.Diagnostics;
+using System.Threading;
+
+using GHIElectronics.TinyCLR.Devices.Gpio;
+using GHIElectronics.TinyCLR.Devices.Spi;
+using GHIElectronics.TinyCLR.Pins;
+
+using GHIElectronics.TinyCLR.Drivers.Microchip.Mcp23xxx.Device;
+using static GHIElectronics.TinyCLR.Drivers.Microchip.Mcp23xxx.Mcp23Xxx;
+
+// ReSharper disable InconsistentNaming
+#pragma warning disable IDE1006 // Naming Styles
+
+
+namespace Microchip
+{
+ internal static class Program
+ {
+ private static Timer _outTimer;
+
+ ///
+ /// Using the Microchip Mcp23S18 gpio expander as a native like TinyClr Gpio Pin
+ ///
+ private static void Main()
+ {
+ // use default GPIO controller to setup pins for Mcp23xxx IO Expander
+ var gpioController = GpioController.GetDefault();
+ var reset = gpioController.OpenPin(SC13048.GpioPin.PA2);
+ var chipSelect = gpioController.OpenPin(SC13048.GpioPin.PA3);
+ var interruptPin = gpioController.OpenPin(SC13048.GpioPin.PB8);
+ interruptPin.SetDriveMode(GpioPinDriveMode.InputPullUp);
+
+ // create a Microchip MCP23S18 GPIO expander provider using the SPI bus on the FLEA
+ var mcp23S18 = new Mcp23GpioProvider(Product.Mcp23X18, SpiController.FromName(SC13048.SpiBus.Spi2), chipSelect, reset: reset, interruptPin: interruptPin);
+ // use the Mcp23S18 provider to create a 'native' GpioController
+ var externalGpioController = GpioController.FromProvider(mcp23S18);
+
+ // use the external GpioController to set up an external LED
+ // use port A, pin 0, set as output, no pull-up (using external pull up resistor as Mcp23S18 has open drain outputs)
+ var exLed = externalGpioController.OpenPin(ExternalGpioPin.GpA0);
+ exLed.SetDriveMode(GpioPinDriveMode.OutputOpenDrain);
+
+ // use the external GpioController to set up an external Button
+ // use port A, pin 1 set as input, using internal pull-up and 30ms debounce timing, set with a callback when either rising or falling edge is detected
+ var exButton = externalGpioController.OpenPin(ExternalGpioPin.GpA1);
+ exButton.SetDriveMode(GpioPinDriveMode.InputPullUp);
+ exButton.DebounceTimeout = TimeSpan.FromMilliseconds(30);
+ exButton.ValueChangedEdge = GpioPinEdge.FallingEdge | GpioPinEdge.RisingEdge;
+ exButton.ValueChanged += (_, args) =>
+ {
+ Debug.WriteLine($"change: edge:{(args.Edge == GpioPinEdge.RisingEdge ? "rise" : "fall")} ts:{args.Timestamp}");
+ exLed.Write(exLed.Read() == GpioPinValue.Low ? GpioPinValue.High : GpioPinValue.Low);
+ };
+
+ // now you can use an expanded GPIO pin wherever a standard GpioPin is required; without need to extend the sealed GpioPin class
+ var exChipSelect = externalGpioController.OpenPin(ExternalGpioPin.GpB0);
+ exChipSelect.SetDriveMode(GpioPinDriveMode.Output);
+ var s = SpiController.FromName(SC13048.SpiBus.Spi1);
+ s.GetDevice(new SpiConnectionSettings{ ChipSelectType = SpiChipSelectType.Gpio, ChipSelectLine = exLed });
+
+
+ // finally use default GPIO controller to blink the internal LED and ensure things are running as expected :-)
+ var onBoardLed = gpioController.OpenPin(SC13048.GpioPin.PA8);
+ onBoardLed.SetDriveMode(GpioPinDriveMode.Output);
+
+ _outTimer = new Timer(_ =>
+ {
+ onBoardLed.Write(onBoardLed.Read() == GpioPinValue.High ? GpioPinValue.Low : GpioPinValue.High);
+ _outTimer.Change(TimeSpan.FromSeconds(2), TimeSpan.FromMilliseconds(-1));
+
+ }, null, TimeSpan.FromSeconds(1), TimeSpan.FromMilliseconds(-1));
+
+ // put main thread to sleep
+ Thread.Sleep(Timeout.Infinite);
+ }
+ }
+}
diff --git a/Projects/IO Expander/Microchip/Properties/AssemblyInfo.cs b/Projects/IO Expander/Microchip/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..f27e189
--- /dev/null
+++ b/Projects/IO Expander/Microchip/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Microchip")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Microchip")]
+[assembly: AssemblyCopyright("Copyright © 2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("40ee1c99-a152-4af9-adce-453967fea98a")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Projects/IO Expander/Microchip/packages.config b/Projects/IO Expander/Microchip/packages.config
new file mode 100644
index 0000000..16372f1
--- /dev/null
+++ b/Projects/IO Expander/Microchip/packages.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Projects/TinyCLR/MemoryManager/MemoryManager.csproj b/Projects/TinyCLR/MemoryManager/MemoryManager.csproj
new file mode 100644
index 0000000..38812d6
--- /dev/null
+++ b/Projects/TinyCLR/MemoryManager/MemoryManager.csproj
@@ -0,0 +1,70 @@
+
+
+
+
+
+ Debug
+ AnyCPU
+ {2F8637E4-D64F-4EA1-B6A1-F93088280A67}
+ Exe
+ MemoryManager
+ MemoryManager
+ v4.5.2
+ 512
+ true
+ {A1948822-69DD-4150-919B-F3F42EFB71CC};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 9
+
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+ packages\GHIElectronics.TinyCLR.Cryptography.2.1.0\lib\net452\GHIElectronics.TinyCLR.Cryptography.dll
+
+
+ packages\GHIElectronics.TinyCLR.Devices.Rtc.2.1.0\lib\net452\GHIElectronics.TinyCLR.Devices.Rtc.dll
+
+
+ packages\GHIElectronics.TinyCLR.Devices.SecureStorage.2.1.0\lib\net452\GHIElectronics.TinyCLR.Devices.SecureStorage.dll
+
+
+ ..\..\..\..\TinyCLR-Drivers\MemoryManager\GHIElectronics.TinyCLR.Drivers.MemoryManager\bin\Debug\GHIElectronics.TinyCLR.Drivers.MemoryManager.dll
+
+
+ packages\GHIElectronics.TinyCLR.Native.2.1.0\lib\net452\GHIElectronics.TinyCLR.Native.dll
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
\ No newline at end of file
diff --git a/Projects/TinyCLR/MemoryManager/MemoryManager.sln b/Projects/TinyCLR/MemoryManager/MemoryManager.sln
new file mode 100644
index 0000000..6248787
--- /dev/null
+++ b/Projects/TinyCLR/MemoryManager/MemoryManager.sln
@@ -0,0 +1,27 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31624.102
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MemoryManager", "MemoryManager.csproj", "{2F8637E4-D64F-4EA1-B6A1-F93088280A67}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {2F8637E4-D64F-4EA1-B6A1-F93088280A67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2F8637E4-D64F-4EA1-B6A1-F93088280A67}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2F8637E4-D64F-4EA1-B6A1-F93088280A67}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {2F8637E4-D64F-4EA1-B6A1-F93088280A67}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2F8637E4-D64F-4EA1-B6A1-F93088280A67}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2F8637E4-D64F-4EA1-B6A1-F93088280A67}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {D82A7AC9-3B46-47A8-86E9-8C18FC655172}
+ EndGlobalSection
+EndGlobal
diff --git a/Projects/TinyCLR/MemoryManager/Program.cs b/Projects/TinyCLR/MemoryManager/Program.cs
new file mode 100644
index 0000000..6ddd3f7
--- /dev/null
+++ b/Projects/TinyCLR/MemoryManager/Program.cs
@@ -0,0 +1,121 @@
+using System.Diagnostics;
+using System.Threading;
+
+using GHIElectronics.TinyCLR.Devices.SecureStorage;
+using GHIElectronics.TinyCLR.Devices.Rtc;
+using GHIElectronics.TinyCLR.Drivers.MemoryManager.RtcMemory;
+using GHIElectronics.TinyCLR.Drivers.MemoryManager.SecureMemory;
+
+// ReSharper disable InconsistentNaming
+// ReSharper disable ArrangeThisQualifier
+#pragma warning disable IDE1006 // Naming Styles
+#pragma warning disable IDE0009 // Member access should be qualified.
+
+
+namespace MemoryManager
+{
+ internal static class Program
+ {
+ private static void Main()
+ {
+ // to use the secure storage memory
+ var _memoryManager = new GHIElectronics.TinyCLR.Drivers.MemoryManager.MemoryManager(new SecureStorageInterface(new SecureStorageController(SecureStorage.Configuration)));
+
+ // to use rtc memory
+ //_memoryManager = new GHIElectronics.TinyCLR.Drivers.MemoryManager.MemoryManager(new RtcMemoryInterface(RtcController.GetDefault()));
+
+
+ // store a byte array
+ if (!_memoryManager.Recall(0, out var @byteArray))
+ _memoryManager.AddOrReplace(0, new byte[] { 88, 11, 0xbb });
+ else
+ foreach (var b in (byte[])@byteArray)
+ Debug.WriteLine(b.ToString());
+
+ // store a byte
+ if (!_memoryManager.Recall(1, out var @byte))
+ _memoryManager.AddOrReplace(1, (byte)22);
+ else
+ Debug.WriteLine(@byte.ToString());
+
+ // store a signed byte
+ if (!_memoryManager.Recall(2, out var @sbyte))
+ _memoryManager.AddOrReplace(2, (sbyte)55);
+ else
+ Debug.WriteLine(@sbyte.ToString());
+
+ // store a bool
+ if (!_memoryManager.Recall(3, out var @bool))
+ _memoryManager.AddOrReplace(3, true);
+ else
+ Debug.WriteLine(@bool.ToString());
+
+ // store a short
+ if (!_memoryManager.Recall(4, out var @short))
+ _memoryManager.AddOrReplace(4, (short)15000);
+ else
+ Debug.WriteLine(@short.ToString());
+
+ // store a ushort
+ if (!_memoryManager.Recall(5, out var @ushort))
+ _memoryManager.AddOrReplace(5, (ushort)49999);
+ else
+ Debug.WriteLine(@ushort.ToString());
+
+ // store a int
+ if (!_memoryManager.Recall(6, out var @int))
+ _memoryManager.AddOrReplace(6, (int)270000);
+ else
+ Debug.WriteLine(@int.ToString());
+
+ // store a uint
+ if (!_memoryManager.Recall(7, out var @uint))
+ _memoryManager.AddOrReplace(7, (uint)3949499);
+ else
+ Debug.WriteLine(@uint.ToString());
+
+ // store a float
+ if (!_memoryManager.Recall(8, out var @float))
+ _memoryManager.AddOrReplace(8, (float)6.4);
+ else
+ Debug.WriteLine(@float.ToString());
+
+ // store a long
+ if (!_memoryManager.Recall(9, out var @long))
+ _memoryManager.AddOrReplace(9, (long)987654321000000000);
+ else
+ Debug.WriteLine(@long.ToString());
+
+ // store a ulong
+ if (!_memoryManager.Recall(10, out var @ulong))
+ _memoryManager.AddOrReplace(10, (ulong)9876543210000000000);
+ else
+ Debug.WriteLine(@ulong.ToString());
+
+ // store a double
+ if (!_memoryManager.Recall(11, out var @double))
+ _memoryManager.AddOrReplace(11, (double)9876543210.987654321);
+ else
+ Debug.WriteLine(@double.ToString());
+
+ // store a char
+ if (!_memoryManager.Recall(13, out var @char))
+ _memoryManager.AddOrReplace(13, (char)'h');
+ else
+ Debug.WriteLine(@char.ToString());
+
+ // store a string
+ if (!_memoryManager.Recall(12, out var @string))
+ _memoryManager.AddOrReplace(12, (string)"xyz");
+ else
+ Debug.WriteLine(@string.ToString());
+
+ Debug.WriteLine("");
+
+ // display a memory dump in the output window
+ _memoryManager.Dump();
+
+ Thread.Sleep(Timeout.Infinite);
+ }
+ }
+}
diff --git a/Projects/TinyCLR/MemoryManager/Properties/AssemblyInfo.cs b/Projects/TinyCLR/MemoryManager/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..7d5d8e8
--- /dev/null
+++ b/Projects/TinyCLR/MemoryManager/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("MemoryManager")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MemoryManager")]
+[assembly: AssemblyCopyright("Copyright © 2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("2f8637e4-d64f-4ea1-b6a1-f93088280a67")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Projects/TinyCLR/MemoryManager/packages.config b/Projects/TinyCLR/MemoryManager/packages.config
new file mode 100644
index 0000000..5b13f8f
--- /dev/null
+++ b/Projects/TinyCLR/MemoryManager/packages.config
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file