#include "io430.h"
int main()
{
unsigned int i,j;
unsigned int a[]={0x01,0x00,0x11,0x00,0x11,0x10,0x1f,0xf8,0x11,0x00,0x21,
0x00,0x01,0x04,0xff,0xfe,0x03,0x00,0x05,0x80,0x09,0x40,
0x11,0x30,0x21,0x0e,0xc1,0x04,0x01,0x00,0x01,0x00}; //行显示朱字
//unsigned int b[]={0x01,0x04,0x01,0x05,0x08,0x79,0x10,0x11,0x20,0x11,0x40,
// 0x11,0x80,0xff,0xff,0x11,0x40,0x11,0x20,0x11,0x10,0x31,
//0x10,0x11,0x08,0x03,0x0c,0x0c,0x01,0x08,0x00,0x00};
//unsigned int a[]={0x00,0x08,0x01,0x02,0x7a,0xf3,0x4e,0x92,\
0x4a,0x92,0x7a,0x92,0x4B,0xfe,0x4a,0x94,\
0x4a,0x94,0x7a,0x94,0x4a,0xfc,0x4a,0x06,\
0xfa,0x01,0x47,0xfe,0x02,0x00,0x00,0x00};
int c[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f,
0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;
P1DIR=0xff;P2DIR=0xff;
P3DIR=0xff;P4DIR=0xff;
while(1)
{
for(i=0;i<80;i++) {P1OUT=0x01;P2OUT=0x00;P3OUT=0xfe;P4OUT=0xff;}
for(i=0;i<80;i++) {P1OUT=0x11;P2OUT=0x00;P3OUT=0xfd;P4OUT=0xff;}
for(i=0;i<80;i++) {P1OUT=0x11;P2OUT=0x10;P3OUT=0xfb;P4OUT=0xff;}
for(i=0;i<80;i++) {P1OUT=0x1f;P2OUT=0xf8;P3OUT=0xf7;P4OUT=0xff;}
for(i=0;i<80;i++) {P1OUT=0x11;P2OUT=0x00;P3OUT=0xef;P4OUT=0xff;}
for(i=0;i<80;i++) {P1OUT=0x21;P2OUT=0x00;P3OUT=0xdf;P4OUT=0xff;}
for(i=0;i<80;i++) {P1OUT=0x01;P2OUT=0x04;P3OUT=0xbf;P4OUT=0xff;}
for(i=0;i<80;i++) {P1OUT=0xff;P2OUT=0xfe;P3OUT=0x7f;P4OUT=0xff;}
for(i=0;i<80;i++) {P1OUT=0x03;P2OUT=0x00;P3OUT=0xff;P4OUT=0xfe;}
for(i=0;i<80;i++) {P1OUT=0x05;P2OUT=0x80;P3OUT=0xff;P4OUT=0xfd;}
for(i=0;i<80;i++) {P1OUT=0x09;P2OUT=0x40;P3OUT=0xff;P4OUT=0xfb;}
for(i=0;i<80;i++) {P1OUT=0x11;P2OUT=0x30;P3OUT=0xff;P4OUT=0xf7;}
for(i=0;i<80;i++) {P1OUT=0x21;P2OUT=0x0e;P3OUT=0xff;P4OUT=0xef;}
for(i=0;i<80;i++) {P1OUT=0xc1;P2OUT=0x04;P3OUT=0xff;P4OUT=0xdf;}
for(i=0;i<80;i++) {P1OUT=0x01;P2OUT=0x00;P3OUT=0xff;P4OUT=0xbf;}
for(i=0;i<80;i++) {P1OUT=0x01;P2OUT=0x00;P3OUT=0xff;P4OUT=0x7f;}
}
}
程序如上,我是新人一个,想编一个16*16LED点阵显示汉字的程序,但死活编不出,自己估计是电路有问题,求大神指教。如果大神能帮忙修改一下电路或者给个示例就最好了,多谢!
-