Professional Documents
Culture Documents
) p877777
) p877777
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
case
'8':
'9':
'A':
'B':
'C':
'D':
'E':
'F':
'G':
'H':
'I':
'J':
'K':
'L':
'M':
'N':
'O':
'P':
'Q':
'R':
'S':
'T':
'U':
'V':
'W':
'X':
'Y':
'Z':
'a':
'b':
'c':
'd':
'e':
'f':
'g':
'h':
'i':
'j':
'k':
'l':
'm':
'n':
'o':
'p':
'q':
'r':
's':
't':
'u':
'v':
'w':
'x':
'y':
'z':
':':
';':
'<':
'=':
'>':
'?':
j=48;break;
j=54;break;
j=60;break;
j=66;break;
j=72;break;
j=78;break;
j=84;break;
j=90;break;
j=96;break;
j=102;break;
j=108;break;
j=114;break;
j=120;break;
j=126;break;
j=132;break;
j=138;break;
j=144;break;
j=150;break;
j=156;break;
j=162;break;
j=168;break;
j=174;break;
j=180;break;
j=186;break;
j=192;break;
j=198;break;
j=204;break;
j=210;break;
j=216;break;
j=222;break;
j=228;break;
j=234;break;
j=240;break;
j=246;break;
j=252;break;
j=258;break;
j=264;break;
j=270;break;
j=276;break;
j=282;break;
j=288;break;
j=294;break;
j=300;break;
j=306;break;
j=312;break;
j=318;break;
j=324;break;
j=330;break;
j=336;break;
j=342;break;
j=348;break;
j=354;break;
j=360;break;
j=366;break;
j=372;break;
j=378;break;
j=384;break;
j=390;break;
j=396;break;
j=402;break;
case '@':
case '%':
case '&':
case '#':
case '$':
case ' ':
} return
j=408;break;
j=414;break;
j=420;break;
j=426;break;
j=432;break;
j=438;break;
j;
}
void main(void)
{
// Declare your local variables here
// Input/Output Ports initialization
// Port A initialization
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T
PORTA=0x00;
DDRA=0xFF;
// Port B initialization
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T
PORTB=0x00;
DDRB=0xFF;
// Port C initialization
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T
PORTC=0x00;
DDRC=0x00;
// Port D initialization
// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In
// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T
PORTD=0x00;
DDRD=0xFF;
// Timer/Counter 0 initialization
// Clock source: System Clock
// Clock value: Timer 0 Stopped
// Mode: Normal top=FFh
// OC0 output: Disconnected
TCCR0=0x00;
TCNT0=0x00;
OCR0=0x00;
// Timer/Counter 1 initialization
// Clock source: System Clock
// Clock value: Timer 1 Stopped
// Mode: Normal top=FFFFh
// OC1A output: Discon.
// OC1B output: Discon.
// Noise Canceler: Off
// Input Capture on Falling Edge
// Timer 1 Overflow Interrupt: Off
// Input Capture Interrupt: Off
// Compare A Match Interrupt: Off
// Compare B Match Interrupt: Off
TCCR1A=0x00;
TCCR1B=0x00;
TCNT1H=0x00;
TCNT1L=0x00;
ICR1H=0x00;
ICR1L=0x00;
OCR1AH=0x00;
OCR1AL=0x00;
OCR1BH=0x00;
OCR1BL=0x00;
// Timer/Counter 2 initialization
// Clock source: System Clock
// Clock value: Timer 2 Stopped
// Mode: Normal top=FFh
// OC2 output: Disconnected
ASSR=0x00;
TCCR2=0x00;
TCNT2=0x00;
OCR2=0x00;
// External Interrupt(s) initialization
// INT0: Off
// INT1: Off
// INT2: Off
MCUCR=0x00;
MCUCSR=0x00;
// Timer(s)/Counter(s) Interrupt(s) initialization
TIMSK=0x00;
// Analog Comparator initialization
// Analog Comparator: Off
// Analog Comparator Input Capture by Timer/Counter 1: Off
ACSR=0x80;
SFIOR=0x00;
//PORTC.1=1;
while (1)
{
for(l=0;l<40;l++)
data[l]=0;
m=0;
while(kalimat[m]!=0)
{
i=0;
while(i<6)
{
y=0;l=i;
for(n=m;n>=0;n--)
{
k=konvert(kalimat[n]);
for(x=l;x>=0;x--)
{
data[y]=text[k+x];y++;
if(y==40){goto tampil;}
}
l=5;
}
tampil:
for(l=0;l<5;l++)
{
PORTB.0=1;clock();
for(k=0;k<40;k++)
{
PORTD=~data[k];delay_us(70);PORTD=255;PORTB.0=0;clock();
}
}
i++;
}
m++;
}
// Place your code here
};
}
void delay2ms(void);
void main(void)
{
unsigned int offset=0,dis_p;
unsigned char x,y,scantimes=0;
do
{
for(x=0;x<8;x++)
{
dis_p=x+offset;
if(dis_p>303)dis_p-=304;
if(dis_p==304) {y=0;}
else {y=dis_code[dis_p];}
P0=0;
P1=tab[x];
P0=y;
delay2ms();
}
scantimes++;
if(scantimes>=8)
{
scantimes=0;
offset++;
if(offset>303)offset=0;
}
}
while(1);
}
void delay2ms(void)
{
unsigned char i,j;
for(i=0;i<4;i++)
for(j=0;j<120;j++);