导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→大冢幫幫忙[wyq1982]

 *第38438篇: 大冢幫幫忙

  
楼 主:wyq1982 2006年3月12日20:51
 大冢幫幫忙
我剛學c,自寫了秒表程序.編譯會出現*** error 65: access violation at C:0x64FF : no 'execute/read' permission; 不知什麼問題,請大冢幫幫.程序在此幫我下什麼問題

#include   <reg51.h>  
sbit P2_1=P2^1;
sbit P2_2=P2^2;
unsigned char code tab[]={0x28,0x34,0x28,0x34,0x0a9,0x60,0x20,0x7a,0x20,0x21,0x61,0x74,0x30,0x62,0xa2,0x7e};
void delay(void)
{
  unsigned char i,j;
  for(i=0;i  <100;i++)
  for(j=0;j  <255;j++);
}
void main(void)
{
 unsigned char scend,tcend; 
 TMOD=0x01;
 TH0=(65536-50000)/256;
 TL0=(65536-50000)%256;
 TR0=1;
 scend=0;
 tcend=0;
      P2_1=0;
      P0=tab[tcend/10];
   P2_1=1;
   delay();
   P2_2=0;
   P0=tab[tcend%10];
   P2_2=1;
 if(TF0==1)
  {
    scend++;
    if(scend==20) 
  {
       scend=0;
      tcend++;
    if(tcend==60)
    {
       tcend=0;
    }
   TF0=0;
   P2_1=0;
      P0=tab[tcend/10];
   P2_1=1;
   delay();
   P2_2=0;
   P0=tab[tcend%10];
   P2_2=1;
     }
   }
}



>>>>>>对该主题发表你的看法

本主题贴数1,分页: [第1页]


[上一篇主题]:供应单片机及EDA实验板

[下一篇主题]:跪求哪们大侠能提供ESD Sensor 静电传感器资料