// Display "Welcome", odd position entering from top and even position entering from bottom
#include "ecen.h"
uint8_t font[7][8] = {
{0xff, 0xbb, 0xbb, 0xab, 0xab, 0xab, 0x93, 0xff},
{0xff, 0x83, 0xbf, 0xbf, 0x83, 0xbf, 0xbf, 0x83},
{0xff, 0xdf, 0xdf, 0xdf, 0xdf, 0xdf, 0xc3, 0xff},
{0xc7, 0xbb, 0xbf, 0xbf, 0xbf, 0xbb, 0xc7, 0xff},
{0xff, 0xc7, 0xbb, 0xbb, 0xbb, 0xbb, 0xc7, 0xff},
{0xff, 0x93, 0xab, 0xab, 0xbb, 0xbb, 0xbb, 0xff},
{0xff, 0xc3, 0xdf, 0xdf, 0xc3, 0xdf, 0xdf, 0xc3},
};
void setup(){
volatile char *dir_A=0x21 , *dir_B=0x24;
*dir_A = 0xff, *dir_B = 0xff;
}
void loop(){
for(int m=0; m<7; m++){
int arr[8]={0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff};
int delay_ms = 200;
for(int i=0; i<9; i++){
if(i==8) delay_ms = 800;
long start = millis();
while(millis()-start < delay_ms){
for(int j=0; j<8; j++){
pulse(arr[j],(0x80>>j));
}
}
for(int j=0; j<7; j++){
arr[j]=arr[j+1];
}
arr[7] = font[m][7-i];
}
m++;
if(m==7) break;
int brr[8]={0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff};
delay_ms = 200;
for(int i=0; i<9; i++){
if(i==8) delay_ms = 800;
long start = millis();
while(millis()-start < delay_ms){
for(int j=0; j<8; j++){
pulse(brr[j],1<<j);
}
}
for(int j=0; j<7; j++){
brr[j]=brr[j+1];
}
brr[7] = font[m][i];
}
}
}