打印

pic 16f877a picc 中断

[复制链接]
3883|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
wo198492|  楼主 | 2009-3-22 23:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
#include <pic.h> 
 
void interrupt Isp()//**************TMR0中断数码管扫描程序*********************
{         
if(T0IE && T0IF)    
{    
  T0IF=0;      //清除中断标志位
  {

    static int counter=0;
    static int flag=0;
    counter++;
    
    if(counter>141)
    {
        counter=0;
        if(flag==0)
        {
          output_C(0);
           flag=1;
        }
        else 
        {
            output_C(0x0f);
            flag=0;
            
        }
}

//***************TMR0初始**************************

void  tmint()
{
 T0CS=0;    //TMR0工作于定时器方式
 PSA=1;     //TMR0不用分频
 T0IF=0;     //清除TMR0的中断标志
 T0IE=1;     //TMR0中断允许
void main()
{
TRISC=0; //C口输出
TMR0_INIT(void)
while(1)
{
}

}

请各位指教了.上面的 编不过发出这样错误  是怎么一回事啊
清除: 正在删除中间文件和输出文件.
清除: 删除的文件 "E:c.mcs".
清除: 完成.
Executing: "C:Program FilesHI-TECH SoftwarePICC9.50BINPICC.EXE" -C -E"zhogduan.cce" "zhogduan.c" -O"zhogduan.obj" -Zg9 -O -ASMLIST -Q -MPLAB -16F877A
Advisory[1207]   : some of the command line options you are using are now obsolete
Advisory[1208]   : use --help option or refer to the user manual for option details
Warning[176] E:zhogduan.c 46 : missing newline
Warning[349] E:zhogduan.c 4 : non-prototyped function declaration for ""
Warning[349] E:zhogduan.c 4 : non-prototyped function declaration for "Isp"
Warning[361] E:zhogduan.c 19 : function declared implicit int
Error[195] E:zhogduan.c 32 : expression syntax
Error[228] E:zhogduan.c 34 : illegal character (037777777643)
Error[228] E:zhogduan.c 34 : illegal character (037777777673)
Error[228] E:zhogduan.c 35 : illegal character (037777777643)
Error[228] E:zhogduan.c 35 : illegal character (037777777673)
Error[228] E:zhogduan.c 36 : illegal character (037777777643)
Error[228] E:zhogduan.c 36 : illegal character (037777777673)
Error[228] E:zhogduan.c 37 : illegal character (037777777643)
Error[228] E:zhogduan.c 37 : illegal character (037777777673)
Warning[361] E:zhogduan.c 41 : function declared implicit int
Error[195] E:zhogduan.c 41 : expression syntax
Error[312] E:zhogduan.c 44 : ";" expected
Warning[337] E:zhogduan.c 45 : line does not have a newline on the end
Halting build on first failure as requested.
BUILD FAILED:        
这是怎么一回事
沙发
李冬发| | 2009-3-23 01:21 | 只看该作者

你的分号";"太大了!用小一号的试吧

使用特权

评论回复
板凳
李冬发| | 2009-3-23 01:21 | 只看该作者

...Isp() 定义一个原型

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

15

主题

24

帖子

0

粉丝