char char_gen[10]={0X7D,0X60,0X3E,0X7A,0X63,0X5B,0x5F,0X70,0X7F,0X7B};
unsigned int i,j,a,b,c,d;
#include"msp430x41x2.h"
#define MCLK_C ((double)1000000)
#define delay_s(x) __delay_cycles((long)(MCLK_C*(double)x))
int main( void )
{
WDTCTL = WDTPW + WDTHOLD;
LCDACTL=LCD4MUX+LCDFREQ_64+LCDON;
LCDAPCTL0=0xFF;
LCDAPCTL1=0x03;
P5SEL=0xF0;
P4SEL=0XFF;
P3SEL=0XF0;
P2SEL=0XFF;
for(i=0;i<10;i++)
{LCDMEM=0;}
LCDMEM[2]=0X02;
LCDMEM[5]=0X02;
P1DIR=0X00;
P1IES=0XFF;
P1IE=0XFF;
P1IFG=0X00;
_EINT();
while(1)
{
for(d=0;d<3;d++)
{LCDMEM[0]=char_gen[d];
for(c=0;c<10;c++)
{LCDMEM[1]=char_gen[c];
for(b=0;b<6;b++)
{LCDMEM[3]=char_gen;
for(a=0;a<10;a++)
{LCDMEM[4]=char_gen[a];
for(j=0;j<6;j++)
{LCDMEM[6]=char_gen[j];
for(i=0;i<10;i++)
{
LCDMEM[7]=char_gen;
delay_s(1);
if(d==2&c==3&b==5&a==9&j==5&i==9)
{d=3;c=10;b=6;a=10;i=10;j=6;
}}}}}}}}}
#pragma vector=PORT1_VECTOR
__interrupt void A_1 (void)
{
if(P1IFG&0X01==1)
LCDMEM[0]=0X70;
}
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>