Ok tried coding for 16, and it just got worse. Here are the code snippets of what I am doing. Maybe this will help.
{from program.cs}
(...)
_max = new Max72197221(chipSelect: Pins.GPIO_PIN_D8);
(...)
while (true)
{
Random rndGen0 = new Random();
_max.SetIntensity(15);
byte[] r2 = new byte[8]; //for speed, an 8 byte setup
byte[] r3 = new byte[16]; //for speed, a 16 byte setup
rndGen0.NextBytes(r2); //random generator for 8
rndGen0.NextBytes(r3); //random generator for 16
_max.Display(r3); //display either the 8 or 16 byte depending on what I put in
Thread.Sleep(120);
}
(...)
{from max72197221.cs}
(...)
public class Max72197221 : IDisposable
{
public enum RegisterAddressMap
{
NoOp,
Digit0,
Digit1,
Digit2,
Digit3,
Digit4,
Digit5,
Digit6,
Digit7,
DecodeMode,
Intensity,
ScanLimit,
Shutdown,
DisplayTest = 0x0F
}
(...)
public void Display(byte[] matrix)
{
//if (matrix.Length != 8)
//{
// throw new ArgumentOutOfRangeException("matrix");
//}
// the above code set an error if the byte was more than 8, so I just shut it down
var rowNumber = (byte)RegisterAddressMap.Digit0;
foreach (var rowData in matrix)
{
Write(rowNumber, rowData);
rowNumber++;
}
}
(...)
When I lock it down to 8, it works perfect (well if you consider all displays showing the exact same thing perfect). When I take it outside of 8, it goes haywire.