// 10*8 LED matrix with 4017 IC // Made by Vadim S. //On 25.06.2009 int clock = 9;// goes to the clock pin on the 4017 IC int reset = 8;//goes to the reset pin on the 4017 IC //x,y for the loop int x; int y; // here the definion of all the letter(big ans small) and numbers #define A {B00000000,B00111100,B01000010,B01000010,B01000010,B01111110,B01000010,B01000010,B01000010,B00000000} #define B {B00000000,B01111100,B01000010,B01000010,B01111100,B01000010,B01000010,B01000010,B01111100,B00000000} #define C {B00000000,B00111110,B01000000,B01000000,B01000000,B01000000,B01000000,B01000000,B00111110,B00000000} #define D {B00000000,B01111100,B01000010,B01000010,B01000010,B01000010,B01000010,B01000010,B01111100,B00000000} #define E {B00000000,B01111110,B01000000,B01000000,B01111100,B01000000,B01000000,B01000000,B01111110,B00000000} #define F {B00000000,B01111110,B01000000,B01000000,B01111100,B01000000,B01000000,B01000000,B01000000,B00000000} #define G {B00000000,B00111100,B01000010,B01000010,B01000000,B01000111,B01000010,B01000010,B00111100,B00000000} #define H {B00000000,B01000010,B01000010,B01000010,B01111110,B01000010,B01000010,B01000010,B01000010,B00000000} #define I {B00000000,B00111000,B00010000,B00010000,B00010000,B00010000,B00010000,B00010000,B00111000,B00000000} #define J {B00000000,B00011100,B00001000,B00001000,B00001000,B00001000,B01001000,B01001000,B00110000,B00000000} #define K {B00000000,B01000100,B01001000,B01010000,B01100000,B01010000,B01001000,B01000100,B01000010,B00000000} #define L {B00000000,B01000000,B01000000,B01000000,B01000000,B01000000,B01000000,B01000000,B01111110,B00000000} #define M {B00000000,B01000100,B10101010,B10010010,B10010010,B10000010,B10000010,B10000010,B10000010,B00000000} #define N {B00000000,B01000010,B01100010,B01010010,B01001010,B01001010,B01001010,B01000110,B01000010,B00000000} #define O {B00000000,B00111100,B01000010,B01000010,B01000010,B01000010,B01000010,B01000010,B00111100,B00000000} #define P {B00000000,B00111100,B01000010,B01000010,B01000010,B01111100,B01000000,B01000000,B01000000,B00000000} #define Q {B00000000,B00111100,B01000010,B01000010,B01000010,B01000010,B01000010,B01000110,B00111110,B00000001} #define R {B00000000,B00111100,B01000010,B01000010,B01000010,B01111100,B01000100,B01000010,B01000010,B00000000} #define S {B00000000,B00111100,B01000010,B01000000,B01000000,B00111100,B00000010,B01000010,B00111100,B00000000} #define T {B00000000,B11111110,B00010000,B00010000,B00010000,B00010000,B00010000,B00010000,B00010000,B00000000} #define U {B00000000,B01000010,B01000010,B01000010,B01000010,B01000010,B01000010,B01000010,B00111100,B00000000} #define V {B00000000,B01000010,B01000010,B01000010,B01000010,B01000010,B01000010,B00100100,B00011000,B00000000} #define W {B00000000,B10000010,B10000010,B10000010,B10000010,B10010010,B10010010,B10101010,B01000100,B00000000} #define X {B00000000,B01000010,B01000010,B00100100,B00011000,B00011000,B00100100,B01000010,B01000010,B00000000} #define Y {B00000000,B10000010,B01000100,B00101000,B00010000,B00010000,B00010000,B00010000,B00010000,B00000000} #define Z {B00000000,B01111110,B00000010,B00000100,B00001000,B00010000,B00100000,B01000000,B01111110,B00000000} #define lit_a {B00000000,B00000000,B00000000,B00000000,B00111000,B01000100,B01000101,B01000101,B00111010,B00000000} #define lit_b {B00000000,B00000000,B00100000,B00100000,B00100000,B00111100,B00100010,B00100010,B00111100,B00000000} #define lit_c {B00000000,B00000000,B00000000,B00000000,B00111100,B01000000,B01000000,B01000000,B00111100,B00000000} #define lit_d {B00000000,B00000000,B00000100,B00000100,B00000100,B00111100,B01000100,B01000100,B00111100,B00000000} #define lit_e {B00000000,B00000000,B00000000,B00111000,B01000100,B01000100,B01111000,B01000000,B00111100,B00000000} #define lit_f {B00000000,B00011000,B00100100,B00100000,B00100000,B01110000,B00100000,B00100000,B00100000,B00000000} #define lit_g {B00000000,B00011100,B00100010,B00100010,B00011110,B00000010,B00000010,B00010010,B00001100,B00000000} #define lit_h {B00000000,B01000000,B01000000,B01000000,B01000000,B01111000,B01000100,B01000100,B01000100,B00000000} #define lit_i {B00000000,B00000000,B00010000,B00000000,B00010000,B00010000,B00010000,B00010000,B00010000,B00000000} #define lit_j {B00000000,B00000000,B00010000,B00000000,B00010000,B00010000,B00010000,B01010000,B00110000,B00000000} #define lit_k {B00000000,B00000000,B00000000,B01001000,B01010000,B01100000,B01100000,B01010000,B01001000,B00000000} #define lit_l {B00000000,B01000000,B01000000,B01000000,B01000000,B01000000,B01000000,B01000000,B01000000,B00000000} #define lit_m {B00000000,B00000000,B00000000,B00110100,B01001010,B01001010,B01001010,B01001010,B01001010,B00000000} #define lit_n {B00000000,B00000000,B00000000,B01111000,B01000100,B01000100,B01000100,B01000100,B01000100,B00000000} #define lit_o {B00000000,B00000000,B00000000,B00000000,B00011100,B00100010,B00100010,B00100010,B00011100,B00000000} #define lit_p {B00000000,B00000000,B00000000,B00011100,B00100010,B00100010,B00111100,B00100000,B00100000,B00100000} #define lit_q {B00000000,B00000000,B00000000,B00111000,B01000100,B01000100,B00111100,B00000100,B00000100,B00000100} #define lit_r {B00000000,B00000000,B00000000,B00111000,B01000000,B01000000,B01000000,B01000000,B01000000,B00000000} #define lit_s {B00000000,B00000000,B00111000,B01000100,B01000000,B00111000,B00000100,B01000100,B00111000,B00000000} #define lit_t {B00000000,B00100000,B00100000,B00100000,B01111000,B00100000,B00100000,B00100010,B00011100,B00000000} #define lit_u {B00000000,B00000000,B00000000,B00000000,B01000100,B01000100,B01000100,B01000100,B00111000,B00000000} #define lit_v {B00000000,B00000000,B00000000,B01000100,B01000100,B01000100,B01000100,B00101000,B00010000,B00000000} #define lit_w {B00000000,B00000000,B00000000,B00000000,B01000100,B01000100,B01010100,B01010100,B00101000,B00000000} #define lit_x {B00000000,B00000000,B00000000,B00000000,B00000000,B00100100,B00011000,B00011000,B00100100,B00000000} #define lit_y {B00000000,B00000000,B01000100,B01000100,B00111100,B00000100,B00000100,B00000100,B00111000,B00000000} #define lit_z {B00000000,B00000000,B00000000,B00000000,B01111100,B00001000,B00010000,B00100000,B01111100,B00000000} #define space {B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000} #define num_0 {B00000000,B00111100,B01000110,B01001010,B01001010,B01001010,B01010010,B01100010,B00111100,B00000000} #define num_1 {B00000000,B00001000,B00011000,B00001000,B00001000,B00001000,B00001000,B00001000,B00011100,B00000000} #define num_2 {B00000000,B00111100,B01000010,B00000100,B00001000,B00010000,B00100000,B01000000,B01111110,B00000000} #define num_3 {B00000000,B01111110,B00000010,B00000010,B00011100,B00000010,B00000010,B01000010,B00111100,B00000000} #define num_4 {B00000000,B00000100,B00001100,B00010100,B00100100,B01000100,B01111110,B00000100,B00000100,B00000000} #define num_5 {B00000000,B01111110,B01000000,B01000000,B00111100,B00000010,B00000010,B00000010,B01111100,B00000000} #define num_6 {B00000000,B00111100,B01000000,B01000000,B01111100,B01000010,B01000010,B01000010,B00111100,B00000000} #define num_7 {B00000000,B01111110,B00000010,B00000100,B00001000,B00010000,B00010000,B00010000,B00010000,B00000000} #define num_8 {B00000000,B00111100,B01000010,B01000010,B00111100,B01000010,B01000010,B01000010,B00111100,B00000000} #define num_9 {B00000000,B00111100,B01000010,B01000010,B01000010,B00111110,B00000010,B00000010,B00111100,B00000000} #define times {B00000000,B00000000,B01000010,B00100100,B00011000,B00011000,B00100100,B01000010,B00000000,B00000000} const int numPatterns = 16;//this is the number of patterns you want to display byte patterns[numPatterns][10]={space,M,lit_a,lit_d,lit_e,space,B,lit_y,space,V,lit_a,lit_d,lit_i,lit_m,space};// the patterns order void setup(){ DDRD=B11111111;// this is a commed that makes pins 0-7 outputs(see more on the arduino site) //simple stuff here pinMode(clock,OUTPUT); pinMode(reset,OUTPUT); //reseting the 4017 IC, you have to do this digitalWrite(reset,HIGH); delayMicroseconds(5); digitalWrite(reset,LOW); } void display_pattern(int loops)//int loop acts like a delay, it take 8 mSecands to scan all of the rows so int loops = 15 is a good time for it { for(x=0;x>7-z);//writes digital outputs, Z is for how much bites it need to scroll delayMicroseconds(800);// the time every row is one PORTD=B00000000;// all pins are low, fixes the ghosting effect // telles the 4017 IC to go to the next row digitalWrite(clock,HIGH); delayMicroseconds(5); digitalWrite(clock,LOW); } } } } } void loop(){ display_pattern(15);// calls for the display_pattern function and says that int loop = 15(if you do more loop the pattern whould scrrol slower). }