#include <msp430.h>
#include "BoardConfig.h"
#include "Cry1602.h"
uchar *s1 = "welcome!@";
void main( void )
{
uchar i;
WDTCTL = WDT_ADLY_1000; //间隔定时器,定时16ms
BoardConfig(0xb8); //关闭数码管、流水灯和电平转换
LcdReset();
DispStr(3,0,s1);
//LocateXY(0,9); //确定写入字符的显示位置
LcdWriteCommand(0x07, 1); //整体显示左移
for(i = 12; i > 0; i--)
{
LcdWriteData(0x20); //
为什么是0x20?这句话是什么意思?
//延时250ms
IFG1 &= ~WD
tiFG;
while(!(IFG1 & WDTIFG));
IFG1 &= ~WDTIFG;
}
while(1)
{
LcdWriteCommand(0x05, 1); //整体显示右移
for(i = 25; i > 0; i--)
{
LcdWriteData(0x20); //
为什么是0x20?这句话是什么意思?
//延时250ms
IFG1 &= ~WDTIFG;
while(!(IFG1 & WDTIFG));
IFG1 &= ~WDTIFG;
}
LcdWriteCommand(0x07, 1); //整体显示左移
for(i = 25; i > 0; i--)
{
LcdWriteData(0x20);//
为什么是0x20?这句话是什么意思?
//延时250ms
IFG1 &= ~WDTIFG;
while(!(IFG1 & WDTIFG));
IFG1 &= ~WDTIFG;
}
}
}
一周热门 更多>