The devices are a memory mapping LED display controller/driver, which can select a number of ROW and commons. These are 32 ROW & 8 Commons and 24 ROW & 16 Commons. The devices support 16-gradation LEDs for each out line using PWM control with software instructions. A serial interface is conveniently provided for the command mode and data mode. Only three or four lines are required for the interface between the host controller and the devices. The display can be extended by cascading the devices for wider applications.
This binding currently only supports writing commands and raw data with GPIO.
-
GPIO
-
SPI
-
WRITE Mode
-
READ Mode
-
READ-MODIFY-WRITE Mode
using var ht1632 = new Ht1632(new Ht1632PinMapping(cs: 27, wr: 22, data: 17), new GpioController())
{
ComOption = ComOption.NMos16Com,
ClockMode = ClockMode.RcPrimary,
Enabled = true,
PwmDuty = 1,
Blink = false,
LedOn = true
};
HT1632 has 4-bit RAM, one byte corresponds to one address. Only lower 4 bits are valid.
var data = new byte[24 * 16 / 4];
var random = new Random();
for (var i = 0; i < data.Length; i++)
{
data[i] = (byte)random.Next();
}
ht1632.WriteData(0, data);
var image = Image.Load<Rgb24>("./dotnet-bot.bmp");
ht1632.ShowImageWith16Com(image);