Skip to content

Commit

Permalink
Merge pull request #2 from ironsheep/newColorDepth
Browse files Browse the repository at this point in the history
Release New color depth Support
  • Loading branch information
ironsheep authored Apr 6, 2022
2 parents a8b93c8 + 1ae4498 commit 58488aa
Show file tree
Hide file tree
Showing 33 changed files with 771 additions and 306 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# macOS files
.DS_Store

# vscode files
.history

# my scripts
checkDropbox

Expand Down
28 changes: 26 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,34 @@ Check [Keep a Changelog](http://keepachangelog.com/) for reminders on how to str
Work to appear in upcoming releases:

- Fix multi-panel support for chips that are not yet working in multi-panel form
- More advanced PWM algorithm yielding better brightness control
- I've even some fun animated clocks coming (sorry, I'm been doing software clocks of many, many, forms for a long time.)
- New morphing digits Matrix displays can be found at [P2 LED-Matrix Morphing Digits](https://github.com/ironsheep/P2-LED-Matrix-Morphing-Digits) Repository.


## [1.0.0] 05 Apr 2022

### Better color presentation, 1/4 RAM usage

- Converted to new PWM generation mechanism allowing compile-time selection of desired display color depth of 3-bit to 8-bit/color (9 to 24bit RGB)
- Now uses 25% of RAM required by previous version for same 4-bit color depth.
- Frees up ~300kB RAM for our P2 P2 Cube Application
- Latest timing and memory usage info posted.

![v1.x driver RAM usage](images/NewDriverRAMUse.png)

**NOTE** *SW0 means our older v0.x drivers, while SW1 means our new v1.x driver!*

## [0.9.0] 2021-05-12

### The first release of P2 P2 Cube support

- The driver now works with multiple 64x64 panels using ICN_2037 Chips organized as 1 row. (The P2 P2 Cube is one row with top and bottom panels being the panels at either end of the row.)

### Known Issues v0.9.0

- Multi-panel support for the FM6126A and MBI5124 driver chips is not yet working!
- The driver is now fast enough now that there are slight display issues with panels using the MBI5124 chips. We're looking into this.

## [0.2.0] 2021-02-19

### Our first (limited) Multi-panel support
Expand All @@ -24,7 +48,7 @@ Work to appear in upcoming releases:
- Driver now works with display of 128x64 using twin 64x64 panels in series.
- Driver now supports 1/8 scan panels (**P4-1921-8S-V2.0**) using the MBI5124 driver chips

### Known Issues
### Known Issues v0.2.0

- Multi-panel support for the FM6126A and MBI5124 driver chips is not yet working!

Expand Down
6 changes: 3 additions & 3 deletions CubePix.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ Repait panels in a loop (you can't see here) so the panels individually change c

----

If you like my work and/or this has helped you in some way then feel free to help me out for a couple of :coffee:'s or :pizza: slices!

[![coffee](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)](https://www.buymeacoffee.com/ironsheep)
> If you find this kind of written explanation useful, helpful I would be honored by your helping me out for a couple of :coffee:'s or :pizza: slices -or- you can support my efforts by contributing at my Patreon site!
>
> [![coffee](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)](https://www.buymeacoffee.com/ironsheep)    -OR-    [![Patreon](./images/patreon.png)](https://www.patreon.com/IronSheep?fan_landing=true)[Patreon.com/IronSheep](https://www.patreon.com/IronSheep?fan_landing=true)
----

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>URL</key>
<string>https://www.altronics.com.au/p/z6517-led-dot-matrix-rgb-32-x-32/</string>
</dict>
</plist>
Binary file added Docs/Altronics-AU/sn245ts/sn54hc245-sp.pdf
Binary file not shown.
Binary file added Docs/sources/newDriverTimings.numbers
Binary file not shown.
28 changes: 15 additions & 13 deletions HUB75-DriverNewPanel.md → HUB75-Driver-SWver0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

![Project Maintenance][maintenance-shield]

NOTE: this is OLDER information. A newer version is here: [Sofware Ver1.x Timings](HUB75-Driver-SWver1.md)

## Intent

The P2 HUB75 backend-end driver has configuration values we place in the file: **isp_hub75_hwGeometry.spin2**. This page presents more detail of what's happening behind the scenes for some of these configurable values.
The P2 HUB75 backend-end driver has configuration values we place in the file: **isp\_hub75_hwGeometry.spin2**. This page presents more detail of what's happening behind the scenes for some of these configurable values.

## Driver Adjustable Settings for given Panel

Expand Down Expand Up @@ -59,7 +61,7 @@ The driver supoorts two forms of latch position:

In the OVERLAPPED case: we see LATCH going high before the start of the three last serial bits of the row and ending after the last serial data bit. However, in the AFTER case we see the LATCH signal going high after the final serial bit of the row is sent.

## Driver configuration by chip type
## Driver configuration by chip type - S/W Ver 0.x Timings

In this section we are recording the configuration we've shown that works for each of the following driver chips we've seen used in the panels. As you identify more, please file an issue telling us the settings you found that work with your panels' driver chip. And we'll add the new details to this document for us all to see.

Expand All @@ -71,10 +73,10 @@ This is the most complicated of the driver chips to date. These chips don't turn
- LATCH_POSITION: OVERLAPPED
- CONFIGURE_PANEL: True
- WIDER_CLOCK: False
- RED_BLUE_SWAP: False
- RED\_BLUE_SWAP: False
- SCAN_4: False

Signal Waveforms and timings for driver r1.1
Signal Waveforms and timings for driver v0.x

| | Time | Frequency |
|----|----|----|
Expand Down Expand Up @@ -102,10 +104,10 @@ This is the most simple chip form. This chip also supports faster data CLK (Max
- LATCH_POSITION: AFTER
- CONFIGURE_PANEL: False
- WIDER_CLOCK: False
- RED_BLUE_SWAP: False
- RED\_BLUE_SWAP: False
- SCAN_4: False

Signal Waveforms and timings for driver r1.1
Signal Waveforms and timings for driver v0.x

| | Time | Frequency |
|----|----|----|
Expand Down Expand Up @@ -133,10 +135,10 @@ This is nearly the same as the FM6124 but needs a slower data CLK (Max 20MHz) (w
- LATCH_POSITION: AFTER
- CONFIGURE_PANEL: False
- WIDER_CLOCK: True
- RED_BLUE_SWAP: True
- RED\_BLUE_SWAP: True
- SCAN_4: False

Signal Waveforms and timings for driver r1.1 using 64x64 Panel.
Signal Waveforms and timings for driver v0.x using 64x64 Panel.

| | Time | Frequency |
|----|----|----|
Expand Down Expand Up @@ -169,7 +171,7 @@ This is nearly the same as the FM6124 but but halves the number of address lines
- RED_BLUE_SWAP: False
- SCAN_4: True

Signal Waveforms and timings for driver r1.1 using 64x32 Panel.
Signal Waveforms and timings for driver v0.x using 64x32 Panel.

| | Time | Frequency |
|----|----|----|
Expand Down Expand Up @@ -202,7 +204,7 @@ This is nearly the same as the FM6124 but needs a slower data CLK (Max 20MHz) (w
- LATCH_POSITION: AFTER
- CONFIGURE_PANEL: False
- WIDER_CLOCK: True
- RED_BLUE_SWAP: True
- RED\_BLUE_SWAP: True
- SCAN_4: False

Signal Waveforms and timings for driver v0.9 using 64x64 Panel.
Expand Down Expand Up @@ -232,9 +234,9 @@ If you study the /OE line (output enable bar), in the image above, you can see t

----

If you like my work and/or this has helped you in some way then feel free to help me out for a couple of :coffee:'s or :pizza: slices!

[![coffee](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)](https://www.buymeacoffee.com/ironsheep)
> If you find this kind of written explanation useful, helpful I would be honored by your helping me out for a couple of :coffee:'s or :pizza: slices -or- you can support my efforts by contributing at my Patreon site!
>
> [![coffee](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)](https://www.buymeacoffee.com/ironsheep) &nbsp;&nbsp; -OR- &nbsp;&nbsp; [![Patreon](./images/patreon.png)](https://www.patreon.com/IronSheep?fan_landing=true)[Patreon.com/IronSheep](https://www.patreon.com/IronSheep?fan_landing=true)
----

Expand Down
194 changes: 194 additions & 0 deletions HUB75-Driver-SWver1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
# HUB75 Driver - configuring for a chip we haven't seen yet

![Project Maintenance][maintenance-shield]

NOTE: this is NEW information as of v1.x! An older version is here: [Sofware Ver0.x Timings](HUB75-Driver-SWver0.md)

## Intent

The P2 HUB75 backend-end driver has configuration values we place in the file: **isp_hub75_hwGeometry.spin2**. This page presents more detail of what's happening behind the scenes for some of these configurable values.

## Driver Adjustable Settings for given Panel

The driver currently offers the following adjustments:

| Purpose | Value Choices | Description
|-----------------|-------------|-----|
| LATCH_STYLE | OFFSET, ENCLOSED | Adjust the waveform of Latch & OE! |
| LATCH_POSITION | OVERLAPPED with the Last Bits of the row AFTER the last bits of the row | When should the latch occur relative to the bits for each row? |
| INIT_PANEL | True, [False] | The Driver chips on this panel require/support a configuration stream prior to normal operation (e.g., FM6126A, FM6126Q, FM6127, and MBI5124)
| WIDER_CLOCK | True, [False] | Inject a wait during the high portion of the data clock (ICN2037 Has 20MHz limit)
| RED\_BLUE_SWAP | True, [False] | It seems that our 64x64 panel requires the red and blue lines to be swapped
| SCAN\_4 | True, [False] | By default [False] the driver sends half the panel pixels over the each of the two sets of RGB lines (RGB1,RGB2), A 1/8th scan panel however [True] sends two diff regions of 1/4 of the panel which is a different pixel ordering.
| ADAPTER\_BASE_PIN | 0-15, 16-31, 32-47, 48-63 [*no default*] | compile driver to use specific header pair to which the HUB75 Adapater card is attached

### PURPOSE: LATCH_STYLE

The driver has two built-in LATCH, OE! styles supporting the hardware we've seen to date.

![Latch Style](images/Latch_Style.png)

**FIGURE 1: LATCH_STYLE: OFFSET (left), ENCLOSED (right)**

#### LEGEND

| Signal | Color |
|-----|-----|
| LATCH | Green |
| OE! | White |
| ADDR | Yellow |


In the OFFSET case: we see OE! going high, we see the row address changing and then we see LATCH going high which latches the serial data into the chip. Then we see the OE! going low, followed by the LATCH going low. However, in the ENCLOSED case the LATCH signal goes low before the OE! goes low.

### PURPOSE: LATCH_POSITION

The driver supoorts two forms of latch position:

![Latch Style](images/Latch_Position.png)

**FIGURE 1: LATCH_POSITION: OVERLAPPED (left), AFTER (right)**

#### LEGEND

| Signal | Color |
|-----|-----|
| CLK | Red |
| LATCH | Green |
| OE! | White |
| ADDR | Yellow |


In the OVERLAPPED case: we see LATCH going high before the start of the three last serial bits of the row and ending after the last serial data bit. However, in the AFTER case we see the LATCH signal going high after the final serial bit of the row is sent.

## Driver configuration by chip type - S/W Ver 1.x Timings

In this section we are recording the configuration we've shown that works for each of the following driver chips we've seen used in the panels. As you identify more, please file an issue telling us the settings you found that work with your panels' driver chip. And we'll add the new details to this document for us all to see.

### Driver Chip: FM6126A

This is the most complicated of the driver chips to date. These chips don't turn on reliably until they've been configured which is a process nearly the same as writing a single row of data but with special meaning to the bit stream and special latch timing. This Chip supports faster data CLK (Max 30MHz)

- LATCH_STYLE: OFFSET
- LATCH_POSITION: OVERLAPPED
- CONFIGURE_PANEL: True
- WIDER_CLOCK: False
- RED\_BLUE_SWAP: False
- SCAN_4: False

Signal Timings - 64x32 panel - for driver v1.x:

![v1.x timings](images/chip-fm6126a-timings.png)

**NOTE** *the orange indicates a frame-rate less than 60Hz so you may see some flicker.*

---

### Driver Chip: FM6124 (UNKNOWN)

This is the most simple chip form. This chip also supports faster data CLK (Max 30MHz) although the driver doesn't, yet.

- LATCH_STYLE: ENCLOSED
- LATCH_POSITION: AFTER
- CONFIGURE_PANEL: False
- WIDER_CLOCK: False
- RED\_BLUE_SWAP: False
- SCAN_4: False

Signal Timings - 64x32 panel - for driver v1.x:

![v1.x timings](images/chip-fm6124-timings.png)

**NOTE** *the green indicates a frame-rate greater than 60Hz for all color depths*

---

### Driver Chip: ICN2037 (UNKNOWN)

This is nearly the same as the FM6124 but needs a slower data CLK (Max 20MHz) (wider pulse width) and our 64x64 panels appear to need Red/Blue swapped!?.

- LATCH_STYLE: ENCLOSED
- LATCH_POSITION: AFTER
- CONFIGURE_PANEL: False
- WIDER_CLOCK: True
- RED\_BLUE_SWAP: True
- SCAN_4: False

Signal Timings - 64x64 panel - for driver v1.x:


![v1.x timings](images/chip-icn2037-timings.png)

**NOTE** *the orange indicates a frame-rate less than 60Hz so you may see some flicker.*

---

### Driver Chip: MBI5124_8S (MBI5124 but panel is 1/8 scan)

This is nearly the same as the FM6124 but but halves the number of address lines which is normally panel rows / 2, but in this case is panel rows / 4. It also clocks out 2x the number of pixels per row.

*NOTE: The MBI5124 does support configuration but it appears that it is already configured at power-up so this driver does not attempt to configure the panel currently. The setting CONFIGURE_PANEL is marked as true so if we add configuration later the driver will use it.*

- LATCH_STYLE: ENCLOSED
- LATCH_POSITION: AFTER
- CONFIGURE_PANEL: True
- WIDER_CLOCK: False
- RED\_BLUE_SWAP: False
- SCAN_4: True

Signal Timings - 64x32 panel - for driver v1.x:

![v1.x timings](images/chip-mbi5124-timings.png)

**NOTE** *the green indicates a frame-rate greater than 60Hz for all color depths*

----

### Driver Chip: ICN2037 (UNKNOWN) for P2 P2 Cube

This is nearly the same as the FM6124 but needs a slower data CLK (Max 20MHz) (wider pulse width) and our 64x64 panels need Red/Blue swapped.
**NOTE** However, I'm successfully clocking the panels at 28.6 MHz (which is faster than the panel 20 MHz max.) while clocking the P2 at 335 MHz.



- LATCH_STYLE: ENCLOSED
- LATCH_POSITION: AFTER
- CONFIGURE_PANEL: False
- WIDER_CLOCK: True
- RED\_BLUE_SWAP: True
- SCAN_4: False

Signal Timings - 64x32 panel x 6! - for driver v1.x.

![v1.x timings](images/chip-icn2037-cube-timings.png)

**NOTE** *the ORANGE indicates a frame-rate less than 60Hz so you may see some flicker while the RED indicates the flicker is really drammatic!*

A single PWM Frame consists of writing 32 - 384 pixel lines (which paint to the top 32 and bottom 32 rows at the same time.)

When this driver is configured for the P2 P2 Cube (1 chain of 6 64x64 pixel panels) the driver copies two lines of PWM data from Hub RAM to COG RAM, clocks out the two rows then fetches the next 2 rows. Within the driver code these two-row groups are called subFrames. For the 6x64x64 panel-set there are 16 of these subFrames for each PWM Frame. There are N PWM Frames creating what we know as a single video frame. Where the N is is 2^{color-depth} number of frames and {color-depth} set by your COLOR_DEPTH compile time value.

----

> If you find this kind of written explanation useful, helpful I would be honored by your helping me out for a couple of :coffee:'s or :pizza: slices -or- you can support my efforts by contributing at my Patreon site!
>
> [![coffee](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)](https://www.buymeacoffee.com/ironsheep) &nbsp;&nbsp; -OR- &nbsp;&nbsp; [![Patreon](./images/patreon.png)](https://www.patreon.com/IronSheep?fan_landing=true)[Patreon.com/IronSheep](https://www.patreon.com/IronSheep?fan_landing=true)
----

## License

Copyright © 2020 Iron Sheep Productions, LLC. All rights reserved.<br />
Licensed under the MIT License. <br>
<br>
Follow these links for more information:

### [Copyright](copyright) | [License](LICENSE)

[maintenance-shield]: https://img.shields.io/badge/maintainer-stephen%40ironsheep.biz-blue.svg?style=for-the-badge

[license-shield]: https://camo.githubusercontent.com/bc04f96d911ea5f6e3b00e44fc0731ea74c8e1e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69616e74726963682f746578742d646976696465722d726f772e7376673f7374796c653d666f722d7468652d6261646765

[releases-shield]: https://img.shields.io/github/release/ironsheep/p2-LED-Matrix-Driver.svg?style=for-the-badge

[releases]: https://github.com/ironsheep/p2-LED-Matrix-Driver/releases
6 changes: 3 additions & 3 deletions HUB75-brd-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ Lead developer
Iron Sheep Productions, LLC.
```

If you find this kind of written explanation useful, helpful I would be honored by your helping me out for a couple of :coffee:'s or :pizza: slices!

[![coffee](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)](https://www.buymeacoffee.com/ironsheep)
> If you find this kind of written explanation useful, helpful I would be honored by your helping me out for a couple of :coffee:'s or :pizza: slices -or- you can support my efforts by contributing at my Patreon site!
>
> [![coffee](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)](https://www.buymeacoffee.com/ironsheep) &nbsp;&nbsp; -OR- &nbsp;&nbsp; [![Patreon](./images/patreon.png)](https://www.patreon.com/IronSheep?fan_landing=true)[Patreon.com/IronSheep](https://www.patreon.com/IronSheep?fan_landing=true)
---

Expand Down
6 changes: 3 additions & 3 deletions HUB75Adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ NOTE: *The I/Cs on this board were selected so that we can drive our panels as f

----

If you like my work and/or this has helped you in some way then feel free to help me out for a couple of :coffee:'s or :pizza: slices!

[![coffee](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)](https://www.buymeacoffee.com/ironsheep)
> If you find this kind of written explanation useful, helpful I would be honored by your helping me out for a couple of :coffee:'s or :pizza: slices -or- you can support my efforts by contributing at my Patreon site!
>
> [![coffee](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)](https://www.buymeacoffee.com/ironsheep) &nbsp;&nbsp; -OR- &nbsp;&nbsp; [![Patreon](./images/patreon.png)](https://www.patreon.com/IronSheep?fan_landing=true)[Patreon.com/IronSheep](https://www.patreon.com/IronSheep?fan_landing=true)
----

Expand Down
Loading

0 comments on commit 58488aa

Please sign in to comment.