Aliexpressなどで販売されている64x32のフルカラードットマトリクスLED2枚とNucleo F401REを利用して、 E233系の駅停車時、路線名表示ありのLED側面行先表示を再現するプログラムです。 3秒間隔、3段階切替で、路線名、種別、行先、次停車駅を個別に指定することが可能です。
Dependencies: SDFileSystem mbed
main.cpp@11:4be8dcbad9f1, 2014-11-11 (annotated)
- Committer:
- chirashi
- Date:
- Tue Nov 11 12:27:13 2014 +0000
- Revision:
- 11:4be8dcbad9f1
- Parent:
- 10:4d9cf202a845
- Child:
- 12:680db9f1f4eb
32128enable;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
RRacer | 0:1f58ecec51d6 | 1 | /* |
RRacer | 0:1f58ecec51d6 | 2 | The goal of this program is to show the basic connections and workings of Adafruits 32x16 RGB LED matrix board (http://www.adafruit.com/products/420), |
RRacer | 0:1f58ecec51d6 | 3 | also sold on other places, for instance http://www.ebay.com/itm/PH6-RGB-Full-Color-LED-16-32-Dot-Matrix-Display-Module-/310303408628?pt=LH_DefaultDomain_0&hash=item483f8641f4 (no |
RRacer | 0:1f58ecec51d6 | 4 | affiliation with either of them). |
RRacer | 0:1f58ecec51d6 | 5 | This program is not intended to be highly optimized or a guideline in C programming in any way (more of the opposite actually). |
RRacer | 1:dd0dcd303d6d | 6 | To have more than 7 colors on this thing, you need to implement software PWM of some sort. I have obviously not done that, but if YOU do, please let me know! |
RRacer | 1:dd0dcd303d6d | 7 | Adafruit have a wicked demo program for an arduino - www.youtube.com/watch?v=lY-flFEfsHo |
RRacer | 0:1f58ecec51d6 | 8 | There are probably lots of ways to make this perform better, perhaps by using Neal Hormans port of the Adafruit_GFX library (http://mbed.org/users/nkhorman/code/Adafruit_GFX/). |
RRacer | 0:1f58ecec51d6 | 9 | No error checking or out-of-bounds checking is done. Use at your own peril. |
RRacer | 0:1f58ecec51d6 | 10 | For more detailed information on the driver chip, see http://www.bjtopspace.com/ziliao/CYT62726.pdf |
RRacer | 0:1f58ecec51d6 | 11 | Although the chips on my board says jx15020, I've been informed that they are equvivalent to the CYT62726, and so far it's a match. |
RRacer | 0:1f58ecec51d6 | 12 | Feel free to use all or parts of this work. |
RRacer | 0:1f58ecec51d6 | 13 | If you choose to do so, I would appreciate a small mentioning in the scrolling opening credits ;) |
RRacer | 0:1f58ecec51d6 | 14 | |
RRacer | 0:1f58ecec51d6 | 15 | Best regards, |
RRacer | 0:1f58ecec51d6 | 16 | Hugo Harming |
RRacer | 0:1f58ecec51d6 | 17 | upgraded@hotmail.com |
RRacer | 0:1f58ecec51d6 | 18 | */ |
RRacer | 0:1f58ecec51d6 | 19 | |
RRacer | 0:1f58ecec51d6 | 20 | #include "mbed.h" |
RRacer | 0:1f58ecec51d6 | 21 | #define LOW 0 |
RRacer | 0:1f58ecec51d6 | 22 | #define HIGH 1 |
RRacer | 0:1f58ecec51d6 | 23 | |
chirashi | 6:e6cb4a476422 | 24 | #define R_Debug1 0 |
chirashi | 6:e6cb4a476422 | 25 | #define R_Debug2 0 |
chirashi | 6:e6cb4a476422 | 26 | #define R_Debug3 0 |
chirashi | 6:e6cb4a476422 | 27 | #define R_Debug4 0 |
chirashi | 6:e6cb4a476422 | 28 | |
chirashi | 6:e6cb4a476422 | 29 | #define G_Debug1 0 |
chirashi | 6:e6cb4a476422 | 30 | #define G_Debug2 0 |
chirashi | 6:e6cb4a476422 | 31 | #define G_Debug3 0 |
chirashi | 6:e6cb4a476422 | 32 | #define G_Debug4 0 |
chirashi | 6:e6cb4a476422 | 33 | |
chirashi | 6:e6cb4a476422 | 34 | #define B_Debug1 0 |
chirashi | 6:e6cb4a476422 | 35 | #define B_Debug2 0 |
chirashi | 6:e6cb4a476422 | 36 | #define B_Debug3 0 |
chirashi | 6:e6cb4a476422 | 37 | #define B_Debug4 0 |
chirashi | 6:e6cb4a476422 | 38 | |
chirashi | 6:e6cb4a476422 | 39 | |
chirashi | 11:4be8dcbad9f1 | 40 | #define LED_Width 128 |
chirashi | 10:4d9cf202a845 | 41 | #define LED_Height 16 |
chirashi | 6:e6cb4a476422 | 42 | |
chirashi | 9:ab87b0e361aa | 43 | BusOut ABC(D8,D9,D10,D14); // Row address. |
chirashi | 2:c1a9a2a0885d | 44 | DigitalOut CLK(D11); // Data clock - rising edge |
chirashi | 2:c1a9a2a0885d | 45 | DigitalOut LAT(D12); // Data latch - active low (pulse up after data load) |
chirashi | 2:c1a9a2a0885d | 46 | DigitalOut OE(D13); // Output enable - active low (hold high during data load, bring low after LAT pulse) |
chirashi | 2:c1a9a2a0885d | 47 | DigitalOut R1(D2); // RED Serial in for upper half |
chirashi | 2:c1a9a2a0885d | 48 | DigitalOut R2(D3); // RED Serial in for lower half |
chirashi | 2:c1a9a2a0885d | 49 | DigitalOut G1(D4); // GREEN Serial in for upper half |
chirashi | 2:c1a9a2a0885d | 50 | DigitalOut G2(D5); // GREEN Serial in for lower half |
chirashi | 2:c1a9a2a0885d | 51 | DigitalOut B1(D6); // BLUE Serial in for upper half |
chirashi | 2:c1a9a2a0885d | 52 | DigitalOut B2(D7); // BLUE Serial in for lower half |
RRacer | 0:1f58ecec51d6 | 53 | |
chirashi | 8:9d22c9910917 | 54 | Ticker ChangeTimer; |
chirashi | 8:9d22c9910917 | 55 | int ChangeCount = 0; |
chirashi | 8:9d22c9910917 | 56 | |
RRacer | 0:1f58ecec51d6 | 57 | unsigned char gm[32][6]; // Buffer with 32x6 bytes. Graphics memory if you like. |
RRacer | 0:1f58ecec51d6 | 58 | unsigned long CT; // Counter for demo code |
RRacer | 0:1f58ecec51d6 | 59 | |
chirashi | 7:79dfe71beb88 | 60 | int LEDBuffer [32][128] = { |
chirashi | 10:4d9cf202a845 | 61 | {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,7,7,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,7,7,0,7,7,0,0,0,0,0,0,0,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0,0,4,0,0,4,0,0,0,4,4,4,4,0,4,0,0,0,4,0,0,0,4,4,4,4,0,0}, |
chirashi | 10:4d9cf202a845 | 91 | {8,8,8,8,8,8,8,8,8,8,8,7,7,8,8,8,8,8,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7,7,8,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,4,0,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,4,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0}, |
chirashi | 10:4d9cf202a845 | 92 | {8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,4,4,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} |
chirashi | 9:ab87b0e361aa | 93 | |
chirashi | 8:9d22c9910917 | 94 | }; |
chirashi | 6:e6cb4a476422 | 95 | |
chirashi | 8:9d22c9910917 | 96 | int LEDBuffer2[32][128] = { |
chirashi | 10:4d9cf202a845 | 97 | |
chirashi | 8:9d22c9910917 | 98 | |
chirashi | 8:9d22c9910917 | 99 | |
chirashi | 8:9d22c9910917 | 100 | }; |
chirashi | 8:9d22c9910917 | 101 | |
chirashi | 8:9d22c9910917 | 102 | int LEDBuffer3[32][128] = { |
chirashi | 9:ab87b0e361aa | 103 | {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,7,7,0,0,0,0,0,7,7,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, |
chirashi | 9:ab87b0e361aa | 104 | {11,11,11,11,0,11,11,11,0,11,0,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,0,0,11,11,11,11,11,11,11,0,11,11,11,11,11,0,11,11,11,11,11,11,0,0,0,0,0,0,0,7,7,0,0,7,7,0,7,7,11,11,11,11,11,11,11,0,11,11,11,11,11,11,0,0,0,0,0,11,0,0,0,0,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, |
chirashi | 9:ab87b0e361aa | 105 | {11,11,11,0,7,0,11,0,7,0,7,0,11,11,11,11,11,11,0,7,0,11,0,0,0,0,7,7,0,11,11,11,11,11,0,7,0,11,11,0,0,7,0,0,11,11,11,11,0,0,0,0,0,0,0,7,7,0,0,7,7,7,0,7,11,11,11,11,11,11,0,7,0,0,0,11,11,0,7,7,7,7,7,0,7,7,7,7,0,11,11,0,7,0,0,0,7,0,0,0,11,0,0,0,0,7,0,0,0,0,11,11,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0}, |
chirashi | 9:ab87b0e361aa | 106 | {11,11,0,0,7,0,11,7,7,7,7,7,0,11,11,11,11,11,11,0,7,0,7,7,7,7,0,0,11,11,11,11,11,0,7,0,0,11,0,7,7,7,7,7,0,11,11,11,0,0,0,0,0,0,0,7,7,0,0,0,7,7,0,7,11,11,11,11,11,0,7,7,7,7,7,0,11,0,7,0,7,0,0,0,7,0,0,7,0,11,11,0,7,7,7,7,7,7,7,7,0,7,7,7,7,7,7,7,7,7,0,11,0,0,4,0,0,0,0,0,4,0,0,0,0,0,0,0}, |
chirashi | 9:ab87b0e361aa | 107 | {11,0,7,7,7,7,0,0,7,0,7,0,0,11,11,11,11,11,0,11,0,0,7,0,0,0,0,0,0,11,11,11,0,7,0,0,7,0,0,7,0,0,0,7,0,11,11,11,0,0,0,0,0,7,7,7,7,7,7,0,7,7,0,7,11,11,11,11,0,7,0,0,0,7,0,11,11,0,7,7,7,7,7,0,7,0,0,7,0,11,11,0,7,0,0,0,0,0,0,0,11,0,0,0,0,7,0,0,0,0,11,11,0,0,0,4,0,0,0,0,4,0,0,0,0,0,0,0}, |
chirashi | 9:ab87b0e361aa | 108 | {11,11,0,0,7,0,7,7,7,7,7,7,7,0,11,11,11,0,7,0,11,0,7,7,7,7,7,7,7,0,11,11,11,0,7,0,7,0,0,7,7,7,7,7,0,11,11,11,0,0,0,0,0,7,7,7,7,7,7,0,0,0,7,7,11,11,0,0,7,7,0,0,7,0,11,11,11,0,7,0,7,0,0,0,7,0,0,7,0,11,0,7,0,0,7,7,7,7,7,0,11,0,7,7,7,7,7,7,7,0,11,11,0,0,0,0,4,0,0,0,4,4,4,4,4,4,4,0}, |
chirashi | 9:ab87b0e361aa | 109 | {11,11,0,7,7,0,0,0,0,7,0,0,0,11,11,11,11,11,0,7,0,0,7,0,0,0,7,0,0,11,11,11,11,11,0,7,0,0,0,7,0,0,0,7,0,11,11,11,0,0,0,0,0,0,0,7,7,0,0,0,0,0,7,7,11,0,7,7,0,0,7,7,0,11,11,11,11,0,7,7,7,7,7,0,7,0,0,7,0,11,0,7,0,0,7,0,0,0,7,0,11,0,7,0,0,7,0,0,7,0,11,11,0,0,0,0,0,0,0,4,0,0,4,0,0,0,4,0}, |
chirashi | 9:ab87b0e361aa | 110 | {11,11,0,7,7,7,0,7,7,7,7,7,0,11,11,11,11,11,11,0,11,0,7,0,11,0,7,0,11,11,11,11,11,0,7,0,0,7,0,7,7,7,7,7,0,11,11,11,0,0,0,0,0,0,7,7,7,7,0,7,7,7,7,7,11,11,0,0,0,0,7,0,7,0,0,11,11,0,7,0,7,0,0,0,7,7,7,7,0,0,7,7,0,0,7,7,7,7,7,0,11,0,7,7,7,7,7,7,7,0,11,11,0,0,0,0,0,0,0,4,0,0,4,0,0,4,0,0}, |
chirashi | 9:ab87b0e361aa | 111 | {11,0,7,0,7,0,0,7,0,7,0,7,0,11,11,11,11,11,11,0,11,0,7,0,0,0,7,0,0,11,11,11,0,7,7,7,7,7,0,0,0,7,0,0,0,11,11,11,0,0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,11,11,0,0,7,7,0,11,0,7,7,0,0,0,7,7,7,7,7,0,7,0,7,0,0,7,0,7,0,7,7,7,7,7,7,7,0,0,7,0,0,7,0,0,7,0,11,11,0,0,0,0,4,0,4,0,0,0,4,0,4,0,0,0}, |
chirashi | 9:ab87b0e361aa | 112 | {11,0,7,0,7,0,0,7,7,7,7,7,0,11,11,11,11,11,0,7,0,7,7,7,7,7,7,7,7,0,11,11,11,0,0,7,0,0,7,7,0,7,7,0,7,0,11,11,0,0,0,0,0,0,7,7,7,0,7,0,0,7,7,0,11,0,7,7,0,0,0,0,0,0,0,7,7,0,0,0,7,0,7,0,7,0,7,0,11,0,0,7,0,7,0,0,0,0,0,7,0,0,7,7,7,7,7,7,7,0,11,11,0,0,0,0,4,0,0,0,0,0,4,0,0,0,0,0}, |
chirashi | 9:ab87b0e361aa | 113 | {11,11,0,0,7,11,0,7,0,7,0,7,0,11,11,11,11,11,0,7,0,0,0,0,0,0,0,0,0,11,11,11,0,7,0,7,7,0,0,7,0,7,7,7,0,11,11,11,0,0,0,0,0,7,7,7,7,0,0,0,7,7,0,0,11,11,0,0,7,7,7,7,7,7,7,0,0,11,0,7,7,0,7,0,7,0,7,0,11,11,0,7,0,0,7,7,7,7,7,0,11,0,0,0,0,7,0,0,0,0,11,11,0,0,0,4,0,0,0,0,0,4,0,4,0,0,0,0}, |
chirashi | 9:ab87b0e361aa | 114 | {11,11,11,0,7,11,0,7,7,7,7,7,0,11,11,11,11,11,0,7,0,11,0,7,0,0,7,0,11,11,11,11,0,7,0,7,7,0,0,7,0,7,0,7,0,11,11,11,0,0,0,0,0,7,0,7,7,0,0,7,7,7,7,0,11,11,11,0,7,0,0,0,0,0,7,0,11,0,7,7,0,0,7,0,7,0,0,7,0,11,0,7,0,11,0,0,7,0,0,11,0,7,7,7,7,7,7,7,7,7,0,11,0,0,0,4,0,0,0,0,0,4,0,4,0,0,0,0}, |
chirashi | 9:ab87b0e361aa | 115 | {11,11,11,0,7,0,0,0,7,0,7,0,0,11,11,11,11,0,7,0,11,0,7,0,11,11,0,7,0,11,11,11,0,7,0,7,0,0,7,0,0,7,0,0,7,0,11,11,0,0,0,0,0,0,0,7,7,0,0,0,0,0,7,7,11,11,11,0,7,0,0,0,0,0,7,0,0,7,7,0,0,0,7,0,7,0,0,7,0,11,0,7,0,11,0,0,7,0,11,11,11,0,0,0,0,7,0,0,0,0,11,11,0,0,4,0,0,0,0,0,4,0,0,0,4,0,0,0}, |
chirashi | 9:ab87b0e361aa | 116 | {11,11,11,0,7,0,7,7,0,11,0,7,7,0,11,11,11,0,7,0,0,7,0,11,11,11,11,0,7,0,11,11,11,0,0,7,0,11,0,7,7,0,11,11,0,11,11,11,0,0,0,0,0,0,0,7,7,0,0,0,0,0,7,7,11,11,11,0,7,7,7,7,7,7,7,0,0,7,0,0,7,7,0,7,0,11,11,0,7,0,0,7,0,0,7,7,0,11,11,11,11,11,11,11,0,7,0,11,11,11,11,11,0,0,4,0,0,0,0,4,0,0,0,0,0,4,0,0}, |
chirashi | 9:ab87b0e361aa | 117 | {11,11,11,11,0,11,0,0,11,11,11,0,0,11,11,11,11,11,0,11,11,0,11,11,11,11,11,11,0,11,11,11,11,11,11,0,11,11,11,0,0,11,11,11,11,11,11,11,0,0,0,0,0,0,0,7,7,0,0,0,7,7,7,0,11,11,11,11,0,0,0,0,0,0,0,11,11,0,11,11,0,0,11,0,11,11,11,11,0,11,11,0,11,11,0,0,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,0,0,0,0,0,4,4,0,0,0,0,0,0,0,4,0}, |
chirashi | 10:4d9cf202a845 | 118 | {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,7,7,0,7,7,7,7,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, |
chirashi | 10:4d9cf202a845 | 119 | {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,7,7,0,0,0,0,0,7,7,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, |
chirashi | 10:4d9cf202a845 | 120 | {11,11,11,11,0,11,11,11,0,11,0,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,0,0,11,11,11,11,11,11,11,0,11,11,11,11,11,0,11,11,11,11,11,11,0,0,0,0,0,0,0,7,7,0,0,7,7,0,7,7,11,11,11,11,11,11,11,0,11,11,11,11,11,11,0,0,0,0,0,11,0,0,0,0,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, |
chirashi | 10:4d9cf202a845 | 121 | {11,11,11,0,7,0,11,0,7,0,7,0,11,11,11,11,11,11,0,7,0,11,0,0,0,0,7,7,0,11,11,11,11,11,0,7,0,11,11,0,0,7,0,0,11,11,11,11,0,0,0,0,0,0,0,7,7,0,0,7,7,7,0,7,11,11,11,11,11,11,0,7,0,0,0,11,11,0,7,7,7,7,7,0,7,7,7,7,0,11,11,0,7,0,0,0,7,0,0,0,11,0,0,0,0,7,0,0,0,0,11,11,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0}, |
chirashi | 10:4d9cf202a845 | 122 | {11,11,0,0,7,0,11,7,7,7,7,7,0,11,11,11,11,11,11,0,7,0,7,7,7,7,0,0,11,11,11,11,11,0,7,0,0,11,0,7,7,7,7,7,0,11,11,11,0,0,0,0,0,0,0,7,7,0,0,0,7,7,0,7,11,11,11,11,11,0,7,7,7,7,7,0,11,0,7,0,7,0,0,0,7,0,0,7,0,11,11,0,7,7,7,7,7,7,7,7,0,7,7,7,7,7,7,7,7,7,0,11,0,0,4,0,0,0,0,0,4,0,0,0,0,0,0,0}, |
chirashi | 10:4d9cf202a845 | 123 | {11,0,7,7,7,7,0,0,7,0,7,0,0,11,11,11,11,11,0,11,0,0,7,0,0,0,0,0,0,11,11,11,0,7,0,0,7,0,0,7,0,0,0,7,0,11,11,11,0,0,0,0,0,7,7,7,7,7,7,0,7,7,0,7,11,11,11,11,0,7,0,0,0,7,0,11,11,0,7,7,7,7,7,0,7,0,0,7,0,11,11,0,7,0,0,0,0,0,0,0,11,0,0,0,0,7,0,0,0,0,11,11,0,0,0,4,0,0,0,0,4,0,0,0,0,0,0,0}, |
chirashi | 10:4d9cf202a845 | 124 | {11,11,0,0,7,0,7,7,7,7,7,7,7,0,11,11,11,0,7,0,11,0,7,7,7,7,7,7,7,0,11,11,11,0,7,0,7,0,0,7,7,7,7,7,0,11,11,11,0,0,0,0,0,7,7,7,7,7,7,0,0,0,7,7,11,11,0,0,7,7,0,0,7,0,11,11,11,0,7,0,7,0,0,0,7,0,0,7,0,11,0,7,0,0,7,7,7,7,7,0,11,0,7,7,7,7,7,7,7,0,11,11,0,0,0,0,4,0,0,0,4,4,4,4,4,4,4,0}, |
chirashi | 10:4d9cf202a845 | 125 | {11,11,0,7,7,0,0,0,0,7,0,0,0,11,11,11,11,11,0,7,0,0,7,0,0,0,7,0,0,11,11,11,11,11,0,7,0,0,0,7,0,0,0,7,0,11,11,11,0,0,0,0,0,0,0,7,7,0,0,0,0,0,7,7,11,0,7,7,0,0,7,7,0,11,11,11,11,0,7,7,7,7,7,0,7,0,0,7,0,11,0,7,0,0,7,0,0,0,7,0,11,0,7,0,0,7,0,0,7,0,11,11,0,0,0,0,0,0,0,4,0,0,4,0,0,0,4,0}, |
chirashi | 10:4d9cf202a845 | 126 | {11,11,0,7,7,7,0,7,7,7,7,7,0,11,11,11,11,11,11,0,11,0,7,0,11,0,7,0,11,11,11,11,11,0,7,0,0,7,0,7,7,7,7,7,0,11,11,11,0,0,0,0,0,0,7,7,7,7,0,7,7,7,7,7,11,11,0,0,0,0,7,0,7,0,0,11,11,0,7,0,7,0,0,0,7,7,7,7,0,0,7,7,0,0,7,7,7,7,7,0,11,0,7,7,7,7,7,7,7,0,11,11,0,0,0,0,0,0,0,4,0,0,4,0,0,4,0,0}, |
chirashi | 10:4d9cf202a845 | 127 | {11,0,7,0,7,0,0,7,0,7,0,7,0,11,11,11,11,11,11,0,11,0,7,0,0,0,7,0,0,11,11,11,0,7,7,7,7,7,0,0,0,7,0,0,0,11,11,11,0,0,0,0,0,0,7,7,7,7,7,7,7,7,7,7,11,11,0,0,7,7,0,11,0,7,7,0,0,0,7,7,7,7,7,0,7,0,7,0,0,7,0,7,0,7,7,7,7,7,7,7,0,0,7,0,0,7,0,0,7,0,11,11,0,0,0,0,4,0,4,0,0,0,4,0,4,0,0,0}, |
chirashi | 10:4d9cf202a845 | 128 | {11,0,7,0,7,0,0,7,7,7,7,7,0,11,11,11,11,11,0,7,0,7,7,7,7,7,7,7,7,0,11,11,11,0,0,7,0,0,7,7,0,7,7,0,7,0,11,11,0,0,0,0,0,0,7,7,7,0,7,0,0,7,7,0,11,0,7,7,0,0,0,0,0,0,0,7,7,0,0,0,7,0,7,0,7,0,7,0,11,0,0,7,0,7,0,0,0,0,0,7,0,0,7,7,7,7,7,7,7,0,11,11,0,0,0,0,4,0,0,0,0,0,4,0,0,0,0,0}, |
chirashi | 10:4d9cf202a845 | 129 | {11,11,0,0,7,11,0,7,0,7,0,7,0,11,11,11,11,11,0,7,0,0,0,0,0,0,0,0,0,11,11,11,0,7,0,7,7,0,0,7,0,7,7,7,0,11,11,11,0,0,0,0,0,7,7,7,7,0,0,0,7,7,0,0,11,11,0,0,7,7,7,7,7,7,7,0,0,11,0,7,7,0,7,0,7,0,7,0,11,11,0,7,0,0,7,7,7,7,7,0,11,0,0,0,0,7,0,0,0,0,11,11,0,0,0,4,0,0,0,0,0,4,0,4,0,0,0,0}, |
chirashi | 10:4d9cf202a845 | 130 | {11,11,11,0,7,11,0,7,7,7,7,7,0,11,11,11,11,11,0,7,0,11,0,7,0,0,7,0,11,11,11,11,0,7,0,7,7,0,0,7,0,7,0,7,0,11,11,11,0,0,0,0,0,7,0,7,7,0,0,7,7,7,7,0,11,11,11,0,7,0,0,0,0,0,7,0,11,0,7,7,0,0,7,0,7,0,0,7,0,11,0,7,0,11,0,0,7,0,0,11,0,7,7,7,7,7,7,7,7,7,0,11,0,0,0,4,0,0,0,0,0,4,0,4,0,0,0,0}, |
chirashi | 10:4d9cf202a845 | 131 | {11,11,11,0,7,0,0,0,7,0,7,0,0,11,11,11,11,0,7,0,11,0,7,0,11,11,0,7,0,11,11,11,0,7,0,7,0,0,7,0,0,7,0,0,7,0,11,11,0,0,0,0,0,0,0,7,7,0,0,0,0,0,7,7,11,11,11,0,7,0,0,0,0,0,7,0,0,7,7,0,0,0,7,0,7,0,0,7,0,11,0,7,0,11,0,0,7,0,11,11,11,0,0,0,0,7,0,0,0,0,11,11,0,0,4,0,0,0,0,0,4,0,0,0,4,0,0,0}, |
chirashi | 10:4d9cf202a845 | 132 | {11,11,11,0,7,0,7,7,0,11,0,7,7,0,11,11,11,0,7,0,0,7,0,11,11,11,11,0,7,0,11,11,11,0,0,7,0,11,0,7,7,0,11,11,0,11,11,11,0,0,0,0,0,0,0,7,7,0,0,0,0,0,7,7,11,11,11,0,7,7,7,7,7,7,7,0,0,7,0,0,7,7,0,7,0,11,11,0,7,0,0,7,0,0,7,7,0,11,11,11,11,11,11,11,0,7,0,11,11,11,11,11,0,0,4,0,0,0,0,4,0,0,0,0,0,4,0,0}, |
chirashi | 10:4d9cf202a845 | 133 | {11,11,11,11,0,11,0,0,11,11,11,0,0,11,11,11,11,11,0,11,11,0,11,11,11,11,11,11,0,11,11,11,11,11,11,0,11,11,11,0,0,11,11,11,11,11,11,11,0,0,0,0,0,0,0,7,7,0,0,0,7,7,7,0,11,11,11,11,0,0,0,0,0,0,0,11,11,0,11,11,0,0,11,0,11,11,11,11,0,11,11,0,11,11,0,0,11,11,11,11,11,11,11,11,11,0,11,11,11,11,11,11,0,0,0,0,0,4,4,0,0,0,0,0,0,0,4,0}, |
chirashi | 9:ab87b0e361aa | 134 | {11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,7,7,0,7,7,7,7,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} |
chirashi | 8:9d22c9910917 | 135 | |
chirashi | 10:4d9cf202a845 | 136 | |
chirashi | 8:9d22c9910917 | 137 | }; |
chirashi | 8:9d22c9910917 | 138 | |
chirashi | 9:ab87b0e361aa | 139 | //10 Yellow(Nambu Local) |
chirashi | 9:ab87b0e361aa | 140 | //11 Green (Yokohama Line) |
chirashi | 9:ab87b0e361aa | 141 | bool R1Data1[32]={0,1,0,0,1,0,1,1,0,1,1,1}; |
chirashi | 9:ab87b0e361aa | 142 | bool R1Data2[32]={0,1,0,0,1,0,1,1,0,1,1,0}; |
chirashi | 9:ab87b0e361aa | 143 | bool R1Data3[32]={0,1,0,0,1,0,1,1,0,1,1,0}; |
chirashi | 9:ab87b0e361aa | 144 | bool R1Data4[32]={0,1,0,0,1,0,1,1,0,1,0,0}; |
chirashi | 4:245f17936b1a | 145 | |
chirashi | 9:ab87b0e361aa | 146 | bool G1Data1[32]={0,0,1,0,1,1,0,1,1,0,1,1}; |
chirashi | 9:ab87b0e361aa | 147 | bool G1Data2[32]={0,0,1,0,1,1,0,1,1,0,1,1}; |
chirashi | 9:ab87b0e361aa | 148 | bool G1Data3[32]={0,0,1,0,1,1,0,1,0,0,0,0}; |
chirashi | 9:ab87b0e361aa | 149 | bool G1Data4[32]={0,0,1,0,1,1,0,1,0,0,0,0}; |
chirashi | 7:79dfe71beb88 | 150 | |
chirashi | 9:ab87b0e361aa | 151 | bool B1Data1[32]={0,0,0,1,0,1,1,1,1,1,0,0}; |
chirashi | 9:ab87b0e361aa | 152 | bool B1Data2[32]={0,0,0,1,0,1,1,1,1,0,0,0}; |
chirashi | 9:ab87b0e361aa | 153 | bool B1Data3[32]={0,0,0,1,0,1,1,1,1,0,0,0}; |
chirashi | 9:ab87b0e361aa | 154 | bool B1Data4[32]={0,0,0,1,0,1,1,1,1,0,0,0}; |
chirashi | 7:79dfe71beb88 | 155 | |
chirashi | 7:79dfe71beb88 | 156 | |
chirashi | 7:79dfe71beb88 | 157 | |
chirashi | 7:79dfe71beb88 | 158 | |
RRacer | 0:1f58ecec51d6 | 159 | |
RRacer | 0:1f58ecec51d6 | 160 | void Init() |
RRacer | 0:1f58ecec51d6 | 161 | { |
RRacer | 0:1f58ecec51d6 | 162 | // Set up things to a known state |
RRacer | 0:1f58ecec51d6 | 163 | CLK = LOW; |
RRacer | 0:1f58ecec51d6 | 164 | LAT = LOW; |
RRacer | 0:1f58ecec51d6 | 165 | OE = HIGH; //display off |
RRacer | 0:1f58ecec51d6 | 166 | ABC = 0; |
RRacer | 0:1f58ecec51d6 | 167 | CT=0; |
chirashi | 7:79dfe71beb88 | 168 | |
RRacer | 0:1f58ecec51d6 | 169 | } |
RRacer | 0:1f58ecec51d6 | 170 | |
RRacer | 0:1f58ecec51d6 | 171 | |
RRacer | 0:1f58ecec51d6 | 172 | |
chirashi | 8:9d22c9910917 | 173 | void WrRow(unsigned char Row, int Buffer[32][128]) |
RRacer | 0:1f58ecec51d6 | 174 | { |
RRacer | 0:1f58ecec51d6 | 175 | // Write specified row (and row+8) to display. Valid input: 0 to 7. |
chirashi | 10:4d9cf202a845 | 176 | ABC = 15-Row; // Set row address |
chirashi | 6:e6cb4a476422 | 177 | for(int col=0; col<LED_Width; col++) { // To daisychain more displays, I guess you would have to increase this counter to n*32 columns. Might mirror though. |
chirashi | 5:532937f20397 | 178 | |
chirashi | 10:4d9cf202a845 | 179 | if (Buffer [(15-Row)][col] == 0){ |
chirashi | 6:e6cb4a476422 | 180 | R1 = R_Debug1; |
chirashi | 6:e6cb4a476422 | 181 | G1 = G_Debug1; |
chirashi | 6:e6cb4a476422 | 182 | B1 = B_Debug1; |
chirashi | 7:79dfe71beb88 | 183 | }else { |
chirashi | 8:9d22c9910917 | 184 | //R1 = R1Data1[(LEDBuffer [(7-Row)][col])]; |
chirashi | 8:9d22c9910917 | 185 | //G1 = G1Data1[(LEDBuffer [(7-Row)][col])]; |
chirashi | 8:9d22c9910917 | 186 | //B1 = B1Data1[(LEDBuffer [(7-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 187 | R1 = R1Data1[(Buffer [(15-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 188 | G1 = G1Data1[(Buffer [(15-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 189 | B1 = B1Data1[(Buffer [(15-Row)][col])]; |
chirashi | 4:245f17936b1a | 190 | } |
chirashi | 7:79dfe71beb88 | 191 | |
chirashi | 10:4d9cf202a845 | 192 | if (Buffer [(31-Row)][col] == 0){ |
chirashi | 6:e6cb4a476422 | 193 | R2 = R_Debug1; |
chirashi | 6:e6cb4a476422 | 194 | G2 = G_Debug1; |
chirashi | 6:e6cb4a476422 | 195 | B2 = B_Debug1; |
chirashi | 7:79dfe71beb88 | 196 | }else { |
chirashi | 10:4d9cf202a845 | 197 | R2 = R1Data1[(Buffer [(31-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 198 | G2 = G1Data1[(Buffer [(31-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 199 | B2 = B1Data1[(Buffer [(31-Row)][col])]; |
chirashi | 7:79dfe71beb88 | 200 | } |
chirashi | 4:245f17936b1a | 201 | |
chirashi | 4:245f17936b1a | 202 | CLK = HIGH; // tick (clock bit in) |
chirashi | 4:245f17936b1a | 203 | CLK = LOW; // tock |
chirashi | 4:245f17936b1a | 204 | } |
chirashi | 4:245f17936b1a | 205 | LAT = HIGH; // Latch entire row |
chirashi | 4:245f17936b1a | 206 | LAT = LOW; |
chirashi | 4:245f17936b1a | 207 | } |
chirashi | 4:245f17936b1a | 208 | |
chirashi | 8:9d22c9910917 | 209 | void WrRow2(unsigned char Row,int Buffer[32][128]) |
chirashi | 4:245f17936b1a | 210 | { |
chirashi | 4:245f17936b1a | 211 | // Write specified row (and row+8) to display. Valid input: 0 to 7. |
chirashi | 10:4d9cf202a845 | 212 | ABC = 15-Row; // Set row address |
chirashi | 6:e6cb4a476422 | 213 | for(int col=0; col<LED_Width; col++) { // To daisychain more displays, I guess you would have to increase this counter to n*32 columns. Might mirror though. |
chirashi | 5:532937f20397 | 214 | |
chirashi | 10:4d9cf202a845 | 215 | if (Buffer [(15-Row)][col] == 0){ |
chirashi | 6:e6cb4a476422 | 216 | R1 = R_Debug2; |
chirashi | 6:e6cb4a476422 | 217 | G1 = G_Debug2; |
chirashi | 6:e6cb4a476422 | 218 | B1 = B_Debug2; |
chirashi | 5:532937f20397 | 219 | }else{ |
chirashi | 10:4d9cf202a845 | 220 | R1 = R1Data2[(Buffer [(15-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 221 | G1 = G1Data2[(Buffer [(15-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 222 | B1 = B1Data2[(Buffer [(15-Row)][col])]; |
chirashi | 5:532937f20397 | 223 | } |
chirashi | 5:532937f20397 | 224 | |
chirashi | 10:4d9cf202a845 | 225 | if (Buffer [(31-Row)][col] == 0){ |
chirashi | 6:e6cb4a476422 | 226 | R2 = R_Debug2; |
chirashi | 6:e6cb4a476422 | 227 | G2 = G_Debug2; |
chirashi | 6:e6cb4a476422 | 228 | B2 = B_Debug2; |
chirashi | 6:e6cb4a476422 | 229 | }else{ |
chirashi | 10:4d9cf202a845 | 230 | R2 = R1Data2[(Buffer [(31-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 231 | G2 = G1Data2[(Buffer [(31-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 232 | B2 = B1Data2[(Buffer [(31-Row)][col])]; |
chirashi | 7:79dfe71beb88 | 233 | } |
chirashi | 5:532937f20397 | 234 | |
chirashi | 5:532937f20397 | 235 | CLK = HIGH; // tick (clock bit in) |
chirashi | 5:532937f20397 | 236 | CLK = LOW; // tock |
chirashi | 5:532937f20397 | 237 | } |
chirashi | 5:532937f20397 | 238 | LAT = HIGH; // Latch entire row |
chirashi | 5:532937f20397 | 239 | LAT = LOW; |
chirashi | 5:532937f20397 | 240 | } |
chirashi | 5:532937f20397 | 241 | |
chirashi | 8:9d22c9910917 | 242 | void WrRow3(unsigned char Row,int Buffer[32][128]) |
chirashi | 5:532937f20397 | 243 | { |
chirashi | 5:532937f20397 | 244 | // Write specified row (and row+8) to display. Valid input: 0 to 7. |
chirashi | 10:4d9cf202a845 | 245 | ABC = 15-Row; // Set row address |
chirashi | 6:e6cb4a476422 | 246 | for(int col=0; col<LED_Width; col++) { // To daisychain more displays, I guess you would have to increase this counter to n*32 columns. Might mirror though. |
chirashi | 5:532937f20397 | 247 | |
chirashi | 10:4d9cf202a845 | 248 | if (Buffer [(15-Row)][col] == 0){ |
chirashi | 6:e6cb4a476422 | 249 | R1 = R_Debug3; |
chirashi | 6:e6cb4a476422 | 250 | G1 = G_Debug3; |
chirashi | 6:e6cb4a476422 | 251 | B1 = B_Debug3; |
chirashi | 5:532937f20397 | 252 | }else{ |
chirashi | 10:4d9cf202a845 | 253 | R1 = R1Data3[(Buffer [(15-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 254 | G1 = G1Data3[(Buffer [(15-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 255 | B1 = B1Data3[(Buffer [(15-Row)][col])]; |
chirashi | 5:532937f20397 | 256 | } |
chirashi | 5:532937f20397 | 257 | |
chirashi | 10:4d9cf202a845 | 258 | if (Buffer [(31-Row)][col] == 0){ |
chirashi | 6:e6cb4a476422 | 259 | R2 = R_Debug3; |
chirashi | 6:e6cb4a476422 | 260 | G2 = G_Debug3; |
chirashi | 6:e6cb4a476422 | 261 | B2 = B_Debug3; |
chirashi | 5:532937f20397 | 262 | }else{ |
chirashi | 10:4d9cf202a845 | 263 | R2 = R1Data3[(Buffer [(31-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 264 | G2 = G1Data3[(Buffer [(31-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 265 | B2 = B1Data3[(Buffer [(31-Row)][col])]; |
chirashi | 7:79dfe71beb88 | 266 | } |
chirashi | 5:532937f20397 | 267 | |
chirashi | 5:532937f20397 | 268 | CLK = HIGH; // tick (clock bit in) |
chirashi | 5:532937f20397 | 269 | CLK = LOW; // tock |
chirashi | 5:532937f20397 | 270 | } |
chirashi | 5:532937f20397 | 271 | LAT = HIGH; // Latch entire row |
chirashi | 5:532937f20397 | 272 | LAT = LOW; |
chirashi | 5:532937f20397 | 273 | } |
chirashi | 5:532937f20397 | 274 | |
chirashi | 8:9d22c9910917 | 275 | void WrRow4(unsigned char Row,int Buffer[32][128]) |
chirashi | 5:532937f20397 | 276 | { |
chirashi | 5:532937f20397 | 277 | // Write specified row (and row+8) to display. Valid input: 0 to 7. |
chirashi | 10:4d9cf202a845 | 278 | ABC = 15-Row; // Set row address |
chirashi | 6:e6cb4a476422 | 279 | for(int col=0; col<LED_Width; col++) { // To daisychain more displays, I guess you would have to increase this counter to n*32 columns. Might mirror though. |
chirashi | 5:532937f20397 | 280 | |
chirashi | 10:4d9cf202a845 | 281 | if (Buffer [(15-Row)][col] == 0){ |
chirashi | 6:e6cb4a476422 | 282 | R1 = R_Debug4; |
chirashi | 6:e6cb4a476422 | 283 | G1 = G_Debug4; |
chirashi | 6:e6cb4a476422 | 284 | B1 = B_Debug4; |
chirashi | 5:532937f20397 | 285 | }else{ |
chirashi | 10:4d9cf202a845 | 286 | R1 = R1Data4[(Buffer [(15-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 287 | G1 = G1Data4[(Buffer [(15-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 288 | B1 = B1Data4[(Buffer [(15-Row)][col])]; |
chirashi | 5:532937f20397 | 289 | } |
chirashi | 5:532937f20397 | 290 | |
chirashi | 10:4d9cf202a845 | 291 | if (Buffer [(31-Row)][col] == 0){ |
chirashi | 6:e6cb4a476422 | 292 | R2 = R_Debug4; |
chirashi | 6:e6cb4a476422 | 293 | G2 = G_Debug4; |
chirashi | 6:e6cb4a476422 | 294 | B2 = B_Debug4; |
chirashi | 10:4d9cf202a845 | 295 | }else{ |
chirashi | 10:4d9cf202a845 | 296 | R2 = R1Data4[(Buffer [(31-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 297 | G2 = G1Data4[(Buffer [(31-Row)][col])]; |
chirashi | 10:4d9cf202a845 | 298 | B2 = B1Data4[(Buffer [(31-Row)][col])]; |
chirashi | 7:79dfe71beb88 | 299 | } |
chirashi | 5:532937f20397 | 300 | |
chirashi | 5:532937f20397 | 301 | CLK = HIGH; // tick (clock bit in) |
chirashi | 5:532937f20397 | 302 | CLK = LOW; // tock |
chirashi | 5:532937f20397 | 303 | } |
chirashi | 5:532937f20397 | 304 | LAT = HIGH; // Latch entire row |
chirashi | 5:532937f20397 | 305 | LAT = LOW; |
chirashi | 5:532937f20397 | 306 | } |
chirashi | 5:532937f20397 | 307 | |
chirashi | 4:245f17936b1a | 308 | |
chirashi | 3:6dbbc0130e96 | 309 | void WrRowOFF(unsigned char Row) |
chirashi | 3:6dbbc0130e96 | 310 | { |
chirashi | 3:6dbbc0130e96 | 311 | // Write specified row (and row+8) to display. Valid input: 0 to 7. |
chirashi | 10:4d9cf202a845 | 312 | ABC = 15-Row; // Set row address |
chirashi | 6:e6cb4a476422 | 313 | for(int col=0; col<LED_Width; col++) { // To daisychain more displays, I guess you would have to increase this counter to n*32 columns. Might mirror though. |
chirashi | 3:6dbbc0130e96 | 314 | R1 = 0; // Red bit, upper half |
chirashi | 3:6dbbc0130e96 | 315 | G1 = 0; // Green bit, upper half |
chirashi | 3:6dbbc0130e96 | 316 | B1 = 0; // Blue bit, upper half |
chirashi | 3:6dbbc0130e96 | 317 | R2 = 0; // Red bit, lower half |
chirashi | 3:6dbbc0130e96 | 318 | G2 = 0; // Green bit, lower half |
chirashi | 3:6dbbc0130e96 | 319 | B2 = 0; // Blue bit, lower half |
chirashi | 3:6dbbc0130e96 | 320 | CLK = HIGH; // tick (clock bit in) |
chirashi | 3:6dbbc0130e96 | 321 | CLK = LOW; // tock |
chirashi | 3:6dbbc0130e96 | 322 | } |
chirashi | 3:6dbbc0130e96 | 323 | LAT = HIGH; // Latch entire row |
chirashi | 3:6dbbc0130e96 | 324 | LAT = LOW; |
chirashi | 3:6dbbc0130e96 | 325 | } |
chirashi | 3:6dbbc0130e96 | 326 | |
RRacer | 0:1f58ecec51d6 | 327 | void Pset(unsigned char x,unsigned char y, unsigned char c) |
RRacer | 0:1f58ecec51d6 | 328 | { |
RRacer | 0:1f58ecec51d6 | 329 | // Set pixel (x,y) to color c |
RRacer | 0:1f58ecec51d6 | 330 | // Manipulates graphics memory, so you won't see any change til you Paint() it. |
RRacer | 0:1f58ecec51d6 | 331 | unsigned char ud,l,r0,g0,b0; |
RRacer | 0:1f58ecec51d6 | 332 | ud=(y & 8)>>3; // 0 = upper half, 1 = lower half |
RRacer | 0:1f58ecec51d6 | 333 | l=y & 7; // Extract row in upper/lower half |
RRacer | 0:1f58ecec51d6 | 334 | r0=(c & 4) >>2; // Extract red bit from color |
RRacer | 0:1f58ecec51d6 | 335 | g0=(c & 2) >>1; // Extract green bit from color |
RRacer | 0:1f58ecec51d6 | 336 | b0=(c & 1); // Extract blue bit from color |
RRacer | 0:1f58ecec51d6 | 337 | // *******Removes current bit ******* *Adds bit** |
RRacer | 0:1f58ecec51d6 | 338 | gm[x][0+3*ud]=(gm[x][0+3*ud] & (255-(1<<(7-l))))+(r0<<(7-l)); // Red byte |
RRacer | 0:1f58ecec51d6 | 339 | gm[x][1+3*ud]=(gm[x][1+3*ud] & (255-(1<<(7-l))))+(g0<<(7-l)); // Green byte |
RRacer | 0:1f58ecec51d6 | 340 | gm[x][2+3*ud]=(gm[x][2+3*ud] & (255-(1<<(7-l))))+(b0<<(7-l)); // Blue byte |
RRacer | 0:1f58ecec51d6 | 341 | } |
RRacer | 0:1f58ecec51d6 | 342 | |
chirashi | 8:9d22c9910917 | 343 | void Paint(int Buffer2[32][128]) |
RRacer | 0:1f58ecec51d6 | 344 | { |
RRacer | 0:1f58ecec51d6 | 345 | // Write graphics memory to display |
chirashi | 5:532937f20397 | 346 | //1 |
chirashi | 9:ab87b0e361aa | 347 | for(int Row=0; Row<LED_Height; Row++) { |
RRacer | 0:1f58ecec51d6 | 348 | OE = HIGH; // Disable output |
chirashi | 8:9d22c9910917 | 349 | WrRow(Row,Buffer2); |
chirashi | 5:532937f20397 | 350 | //wait_us(10); |
chirashi | 5:532937f20397 | 351 | OE = LOW; // Enable output |
chirashi | 5:532937f20397 | 352 | |
chirashi | 6:e6cb4a476422 | 353 | wait_us(10); // Wasting some time. Use for whatever else. Probably better with a ticker for the display refresh. |
chirashi | 5:532937f20397 | 354 | } |
chirashi | 5:532937f20397 | 355 | //2 |
chirashi | 9:ab87b0e361aa | 356 | for(int Row=0; Row<LED_Height; Row++) { |
chirashi | 5:532937f20397 | 357 | OE = HIGH; // Disable output |
chirashi | 5:532937f20397 | 358 | //WrRow(Row); |
chirashi | 8:9d22c9910917 | 359 | WrRow2(Row,Buffer2); |
chirashi | 5:532937f20397 | 360 | //wait_us(10); |
chirashi | 5:532937f20397 | 361 | OE = LOW; // Enable output |
chirashi | 5:532937f20397 | 362 | |
chirashi | 6:e6cb4a476422 | 363 | wait_us(10); // Wasting some time. Use for whatever else. Probably better with a ticker for the display refresh. |
chirashi | 5:532937f20397 | 364 | } |
chirashi | 5:532937f20397 | 365 | //3 |
chirashi | 9:ab87b0e361aa | 366 | for(int Row=0; Row<LED_Height; Row++) { |
chirashi | 5:532937f20397 | 367 | OE = HIGH; // Disable output |
chirashi | 8:9d22c9910917 | 368 | WrRow3(Row,Buffer2); |
chirashi | 5:532937f20397 | 369 | //wait_us(10); |
chirashi | 5:532937f20397 | 370 | OE = LOW; // Enable output |
chirashi | 5:532937f20397 | 371 | |
chirashi | 6:e6cb4a476422 | 372 | wait_us(10); // Wasting some time. Use for whatever else. Probably better with a ticker for the display refresh. |
chirashi | 5:532937f20397 | 373 | } |
chirashi | 5:532937f20397 | 374 | //4 |
chirashi | 9:ab87b0e361aa | 375 | for(int Row=0; Row<LED_Height; Row++) { |
chirashi | 5:532937f20397 | 376 | OE = HIGH; // Disable output |
chirashi | 8:9d22c9910917 | 377 | WrRow4(Row,Buffer2); |
chirashi | 5:532937f20397 | 378 | //wait_us(10); |
RRacer | 0:1f58ecec51d6 | 379 | OE = LOW; // Enable output |
chirashi | 4:245f17936b1a | 380 | |
chirashi | 6:e6cb4a476422 | 381 | wait_us(10); // Wasting some time. Use for whatever else. Probably better with a ticker for the display refresh. |
chirashi | 5:532937f20397 | 382 | } |
chirashi | 7:79dfe71beb88 | 383 | |
chirashi | 5:532937f20397 | 384 | |
chirashi | 4:245f17936b1a | 385 | } |
chirashi | 4:245f17936b1a | 386 | |
RRacer | 0:1f58ecec51d6 | 387 | |
chirashi | 3:6dbbc0130e96 | 388 | |
chirashi | 3:6dbbc0130e96 | 389 | void PaintOFF() |
chirashi | 3:6dbbc0130e96 | 390 | { |
chirashi | 3:6dbbc0130e96 | 391 | // Write graphics memory to display |
chirashi | 3:6dbbc0130e96 | 392 | for(int Row=0; Row<8; Row++) { |
chirashi | 3:6dbbc0130e96 | 393 | OE = HIGH; // Disable output |
chirashi | 3:6dbbc0130e96 | 394 | WrRowOFF(Row); |
chirashi | 3:6dbbc0130e96 | 395 | OE = LOW; // Enable output |
chirashi | 4:245f17936b1a | 396 | wait_us(50); // Wasting some time. Use for whatever else. Probably better with a ticker for the display refresh. |
chirashi | 3:6dbbc0130e96 | 397 | } |
chirashi | 3:6dbbc0130e96 | 398 | } |
chirashi | 3:6dbbc0130e96 | 399 | |
chirashi | 8:9d22c9910917 | 400 | void TimerTick(){ |
chirashi | 8:9d22c9910917 | 401 | if (ChangeCount == 0){ |
chirashi | 8:9d22c9910917 | 402 | |
chirashi | 8:9d22c9910917 | 403 | |
chirashi | 8:9d22c9910917 | 404 | |
chirashi | 8:9d22c9910917 | 405 | |
chirashi | 8:9d22c9910917 | 406 | ChangeCount = ChangeCount + 1; |
chirashi | 8:9d22c9910917 | 407 | }else if(ChangeCount == 1 ){ |
chirashi | 8:9d22c9910917 | 408 | |
chirashi | 8:9d22c9910917 | 409 | |
chirashi | 8:9d22c9910917 | 410 | ChangeCount = ChangeCount + 1; |
chirashi | 8:9d22c9910917 | 411 | //ChangeCount = 0; |
chirashi | 8:9d22c9910917 | 412 | }else if(ChangeCount == 2){ |
chirashi | 8:9d22c9910917 | 413 | |
chirashi | 8:9d22c9910917 | 414 | ChangeCount = 0; |
chirashi | 8:9d22c9910917 | 415 | }else{ |
chirashi | 8:9d22c9910917 | 416 | |
chirashi | 8:9d22c9910917 | 417 | |
chirashi | 8:9d22c9910917 | 418 | } |
chirashi | 8:9d22c9910917 | 419 | |
chirashi | 8:9d22c9910917 | 420 | |
chirashi | 8:9d22c9910917 | 421 | } |
chirashi | 3:6dbbc0130e96 | 422 | |
RRacer | 0:1f58ecec51d6 | 423 | int main() |
RRacer | 0:1f58ecec51d6 | 424 | { |
RRacer | 0:1f58ecec51d6 | 425 | Init(); // Set things up |
chirashi | 8:9d22c9910917 | 426 | ChangeTimer.attach(&TimerTick,5); |
chirashi | 8:9d22c9910917 | 427 | |
RRacer | 0:1f58ecec51d6 | 428 | while(1) { // Messy demo loop following... |
RRacer | 0:1f58ecec51d6 | 429 | CT++; |
chirashi | 8:9d22c9910917 | 430 | if (ChangeCount == 0){ |
chirashi | 8:9d22c9910917 | 431 | Paint(LEDBuffer); |
chirashi | 8:9d22c9910917 | 432 | }else if(ChangeCount == 1){ |
chirashi | 8:9d22c9910917 | 433 | Paint(LEDBuffer2); |
chirashi | 8:9d22c9910917 | 434 | }else if(ChangeCount == 2){ |
chirashi | 8:9d22c9910917 | 435 | Paint(LEDBuffer3); |
chirashi | 8:9d22c9910917 | 436 | } |
chirashi | 4:245f17936b1a | 437 | |
chirashi | 4:245f17936b1a | 438 | //if((CT<=2560)||(CT>=2880 && CT<=4160)) { |
chirashi | 4:245f17936b1a | 439 | // Paint(); // Refresh display |
chirashi | 4:245f17936b1a | 440 | // if((CT % 20)==0) ShiftRight(); // After every 20 refresh, do a ShiftRight |
chirashi | 4:245f17936b1a | 441 | //} |
chirashi | 3:6dbbc0130e96 | 442 | |
chirashi | 4:245f17936b1a | 443 | //if(CT==2560) { |
chirashi | 4:245f17936b1a | 444 | // for(int c=0; c<8; c++) { |
chirashi | 4:245f17936b1a | 445 | // for(int x=c; x<(31-c); x++) {// Top side |
chirashi | 4:245f17936b1a | 446 | // Pset(x,c,c); |
chirashi | 4:245f17936b1a | 447 | // Paint(); // Display refresh time sets loop duration. |
chirashi | 4:245f17936b1a | 448 | // } |
chirashi | 4:245f17936b1a | 449 | // for(int y=c; y<(15-c); y++) {// Right side |
chirashi | 4:245f17936b1a | 450 | // Pset(31-c,y,c); |
chirashi | 4:245f17936b1a | 451 | // Paint(); |
chirashi | 4:245f17936b1a | 452 | // } |
chirashi | 4:245f17936b1a | 453 | // for(int x=(31-c); x>=c; x--) {// Bottom side |
chirashi | 4:245f17936b1a | 454 | // Pset(x,(15-c),c); |
chirashi | 4:245f17936b1a | 455 | // Paint(); |
chirashi | 4:245f17936b1a | 456 | // } |
chirashi | 4:245f17936b1a | 457 | // for(int y=(15-c); y>=c; y--) { // Left side |
chirashi | 4:245f17936b1a | 458 | // Pset(c,y,c); |
chirashi | 4:245f17936b1a | 459 | // Paint(); |
chirashi | 4:245f17936b1a | 460 | // } |
chirashi | 4:245f17936b1a | 461 | // } |
chirashi | 4:245f17936b1a | 462 | //} |
chirashi | 3:6dbbc0130e96 | 463 | |
RRacer | 0:1f58ecec51d6 | 464 | if(CT>4160) { |
chirashi | 4:245f17936b1a | 465 | //MkPattern(); // Restore original priceless artwork |
RRacer | 0:1f58ecec51d6 | 466 | CT=0; // Start all over. |
RRacer | 0:1f58ecec51d6 | 467 | } |
chirashi | 3:6dbbc0130e96 | 468 | |
chirashi | 4:245f17936b1a | 469 | //PaintOFF(); |
chirashi | 6:e6cb4a476422 | 470 | //wait_us(10); |
RRacer | 0:1f58ecec51d6 | 471 | } |
chirashi | 3:6dbbc0130e96 | 472 | |
RRacer | 0:1f58ecec51d6 | 473 | } |