|
#include"reg52.h"#include"rtx51tny.h"unsigned char code digitron[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e,0x8c,0x7f,0xff};unsigned char code digitron1[]={0xef,0xdf,0xbf,0x7f};unsigned char i;void main_job() _task_ 0 { os_create_task(1);//创建进程1 os_create_task(2);//创建进程2 os_delete_task(0);//将自身删除 }void display0_job()_task_ 1{ unsigned char i; for(;;) { for(i=0;8>i;i++) { P0=0; P2=0xff; P0=0x01<j;j++) { P1=0xff; P3=0xff; P1=digitron[j]; P3=digitron1[j]; // os_wait(K_TMO,100,0); } // os_wait(K_TMO,100,0); } os_wait(K_TMO,100,0);}os_wait(K_TMO,100,0); 不知道用的地方对不 就是像视频里那样闪 |
|