Skip to content

Commit 49e9a58

Browse files
update to documentation
1 parent 59e5a34 commit 49e9a58

File tree

2 files changed

+28
-16
lines changed

2 files changed

+28
-16
lines changed

README.md

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
1-
# Ardunio Driver for RGB LED Matrix
1+
# Arduino Driver for Shift Register LED Matrix
22

3-
To use this driver in the Arduino IDE, add the folder `RGB_LED_Matrix_Lib` as a library as described in [this document](https://www.arduino.cc/en/Guide/Libraries).
3+
This library provides a generalized API to create and drive an image on LED matrix where shift registers, such as the 74HC595 or DM13a, are used to control the rows and columns of the matrix. To use this driver in the Arduino IDE, add the folder `ShiftRegisterLEDMatrixLib` as a library as described in [this document](https://www.arduino.cc/en/Guide/Libraries), or install via the libraries manager in the Arduino IDE.
44

5-
This driver uses SPI to transfer bits to the shift registers.
5+
This driver uses SPI to transfer bits to the shift registers and uses one timer interrupt.
66

7-
## Arduino ATmega Boards
7+
Find at more about this library and hardware that it is designed for at:
8+
[www.kamprath.net/led-matrix/](http://www.kamprath.net/led-matrix/)
9+
10+
# General Design
11+
This library has three general facets: image representation, matrix driver, and animation management.
12+
13+
_detailed documentation TBD_
14+
15+
# Notes
16+
## Driver Boards
17+
### Arduino ATmega Boards
818

919
The default wiring for connecting the RGB LED Matrix to an Arduino using the ATmega328 micro-controller (e.g., Uno, Nano, etc) is:
1020

@@ -19,19 +29,12 @@ The default wiring for connecting the RGB LED Matrix to an Arduino using the ATm
1929

2030
Note that the SPI MISO pin is unused.
2131

22-
## 3.3v Logic Level
23-
To use the RGB LED Matrices designed in this project with microcontroller boards that use a 3.3V logic level, you must convert the 3.3V logic signals to 5V levels to work with the shift registers. You can easily use a 74HCT125 buffer/line driver chip to do this transformation. For example, you can wire a Teensy 3.6, which is a 3.3v device, to a 74HCT125 chip in the manner shown in the diagram below to get all power and signal lines required to drive the RGB LED Matrix while the Teensy is connected to USB power:
24-
25-
![Teensy 3.6 Circuit to Drive RGB LED Matrix](docs/teensy36_5V_logic_circuit.png)
26-
27-
An alternative to using this 74HCT125 circuit would be to replace the 74HC595 shift registers on the RGB LED Matrix with the 74HCT595 variety. However, this might be more expensive.
28-
29-
## Teensy 3.x Boards
32+
### Teensy 3.x Boards
3033
Using the Teensy 3.x as the driving micro-controller for the RGB LED Matrix is a good choice because it's higher clock speed will allow your code to do more work without interrupting the PWM activities that are also happening at the driver level.
3134

3235
To use this Teensy 3.x driver in the Arduino IDE, add the folder `RGB_LED_Matrix_Lib` as a library as described in [this document](https://www.arduino.cc/en/Guide/Libraries). Also, ensure that the Arduino IDE has been updated to support Teensy development ([see here for more information](https://www.pjrc.com/teensy/td_download.html)).
3336

34-
## ESP8266 Boards
37+
### ESP8266 Boards
3538
ESP8266 boards are generally 3.3v logic level boards.
3639

3740
| LED Matrix Connection | Wemos D1 Mini | NodeMCU | Notes |
@@ -42,15 +45,24 @@ ESP8266 boards are generally 3.3v logic level boards.
4245
| **CLK** | D5 | D5 | SPI SCK Pin |
4346
| **LATCH** | D8 | D8 | SS pin |
4447

45-
## Color Modes
48+
### 3.3v Logic Level
49+
To use the RGB LED Matrices designed in this project with micro-controller boards that use a 3.3V logic level, you must convert the 3.3V logic signals to 5V levels to work with the shift registers. You can easily use a 74HCT125 buffer/line driver chip to do this transformation. For example, you can wire a Teensy 3.6, which is a 3.3v device, to a 74HCT125 chip in the manner shown in the diagram below to get all power and signal lines required to drive the RGB LED Matrix while the Teensy is connected to USB power:
50+
51+
![Teensy 3.6 Circuit to Drive RGB LED Matrix](docs/teensy36_5V_logic_circuit.png)
52+
53+
An alternative to using this 74HCT125 circuit would be to replace the 74HC595 shift registers on the RGB LED Matrix with the 74HCT595 variety. However, this might be more expensive.
54+
55+
56+
## RGB LEB Matrices
57+
### Color Modes
4658
This driver can support either 6-bit or 24-bit color. By default, this library uses 6-bit color. You can enable 24 bit color in this library by setting the preprocessor macro `TWENTY_FOUR_BIT_COLOR` to a value of 1 (note, not in your `ino` file, but at compile time for all files). You can do this either by editing the `RGBImage.h` file or setting a compiler flag. However, note that 24 bit color requires more RAM than an Arduino Uno or Nano has. Due its memory requirements, 24 bit color should work on most 32 bit boards and the Arduino Mega 2560. 24 bit color has been tested to work on the following boards:
4759

4860
* Teensy 3.6
4961
* Arduino Mega 2560
5062
* Wemos D1 mini Lite
5163
* NodeMCU
5264

53-
## Bit Layouts
65+
### Bit Layouts
5466
This driver can support two different bit layouts. The default bit layout assumes each RGB LED is a single unit and each column is wired up with the RGB bits consecutively. That is, for a 4x4 matrix, the bit layout would look like this:
5567

5668
![Default Bit Layout for RGB LED Matrix](docs/rgb-led-matrix-bit-layout-default.png)

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Shift Register LED Matrix Lib
2-
version=1.0.0
2+
version=0.9.0
33
author=Michael Kamprath <[email protected]>
44
maintainer=Michael Kamprath <[email protected]>
55
sentence=A driver for LED matrices that use shift registers to control rows and columns.

0 commit comments

Comments
 (0)