Pinscape Controller version 1 fork. This is a fork to allow for ongoing bug fixes to the original controller version, from before the major changes for the expansion board project.
Dependencies: FastIO FastPWM SimpleDMA mbed
Fork of Pinscape_Controller by
Revision 28:2097c6f8f2db, committed 2015-09-23
- Comitter:
- mjr
- Date:
- Wed Sep 23 05:38:27 2015 +0000
- Parent:
- 27:26de4b0917a7
- Child:
- 29:582472d0bc57
- Commit message:
- A few more tweaks in the TLC5940 setup.
Changed in this revision
TLC5940/TLC5940.h | Show annotated file Show diff for this revision Revisions of this file |
config.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/TLC5940/TLC5940.h Wed Sep 23 05:08:26 2015 +0000 +++ b/TLC5940/TLC5940.h Wed Sep 23 05:38:27 2015 +0000 @@ -116,10 +116,11 @@ blank(BLANK), xlat(XLAT), nchips(nchips), - newGSData(false) + newGSData(true) { // allocate the grayscale buffer gs = new unsigned short[nchips*16]; + memset(gs, 0, nchips*16*sizeof(gs[0])); // Configure SPI format and speed. Note that KL25Z ONLY supports 8-bit // mode. The TLC5940 nominally requires 12-bit data blocks for the @@ -139,7 +140,7 @@ gsclk.period(1.0/GSCLK_SPEED); gsclk.write(.5); blank = 0; - + // Set up the first call to the reset function, which asserts BLANK to // end the PWM cycle and handles new grayscale data output and latching. // The original version of this library uses a timer to call reset
--- a/config.h Wed Sep 23 05:08:26 2015 +0000 +++ b/config.h Wed Sep 23 05:38:27 2015 +0000 @@ -135,7 +135,7 @@ // Number of TLC5940 chips you're using. For a full LedWiz-compatible // setup, you need two of these chips, for 32 outputs. -#define TLC5940_NCHIPS 3 +#define TLC5940_NCHIPS 2 // If you're using TLC5940s, change any of these as needed to match the // GPIO pins that you connected to the TLC5940 control pins. Note that