#include "msp430x26x.h"
#include "LCD12864.h"
#include "System.h"
void main( )
{
WDTCTL = WDTPW + WDTHOLD; //关闭看门狗
P2DIR &= ~(BIT0+BIT1+BIT2+BIT3);
P2REN |= BIT0+BIT1+BIT2+BIT3;
_EINT();
while(1)
{
LCD_Printf(1,"key0看电视");
LCD_Printf(3,"key1吃饭");
LCD_Printf(2,"key2听歌");
LCD_Printf(4,"key3学习");
}
if(!(P2IN&BIT0))
{
LCD_Printf(1,"key0花千骨");
LCD_Printf(2,"key1花满楼");
if(!(P2IN&BIT0))
LCD_Init();
LCD_Clr();
while(1)
{
LCD_DrawLine( 40,0, 40, 64, 1);
LCD_DrawLine( 80,0, 80, 64, 1);
LCD_DrawLine( 120,0, 120, 64, 1);
LCD_DrawLine( 0,60, 126, 60, 1);
LCD_DrawLine( 0,60, 126, 60, 1);
}
break;
}
if(!(P2IN&BIT1))
{LCD_Init();
LCD_Clr();
while(1)
{
LCD_DrawDot( 80, 32,1) ;
LCD_DrawDot( 80, 34,1) ;
LCD_DrawDot( 80, 40,1) ;
LCD_DrawDot( 80, 30,1) ;
LCD_DrawDot( 80, 24,1) ;
LCD_DrawDot( 82, 32,1) ;
LCD_DrawDot( 88, 32,1) ;
LCD_DrawDot( 78, 32,1) ;
LCD_DrawDot( 72, 32,1) ;
break;
}
if(!(P2IN&BIT2))
{ while(1)
{
LCD_Printf("不");
}
break;
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
一周热门 更多>