none
fatal error C1083: 无法打开包括文件:“htc. h”: No such file or directory RRS feed

  • 问题

  •       在Multisim12中进行的8052单片机仿真实验,该实验为进制计数器,输入C程序源代码后,编译时显示一个错误为“fatal error C1083: 无法打开包括文件:“htc. h”: No such file or directory”,网上到处查找原因未果特来请教各位前辈高人,谢谢!

    代码如下所示:

    #include < htc. h >
    void delay( unsigned int i) ;
    unsigned char code table [ ] = { 0x40, 0x79, 0x24, 0x30, 0x19, 0x12, 0x02,
    0x78, 0x00, 0x90};
    unsigned char a1, a2, a3;
    void main ( )
    {
    unsigned int i;
    while (1)
    { for( i = 0; i < 11; i + + )
    {
    if ( i = = 0)
    {P2 = 0x40;
    P1 = 0x40;
    P0 = 0x40; }
    if ( i = = 1)
    {P2 = 0x79;
    P1 = 0x40;
    P0 = 0x40; }
    if ( i = = 2)
    {P2 = 0x24;
    P1 = 0x40;
    P0 = 0x40;
    }
    if ( i = = 3)
    {
    P2 = 0x30;
    P1 = 0x40;
    P0 = 0x40;
    }
    if ( i = = 4)
    {
    P2 = 0x19;
    P1 = 0x40;
    P0 = 0x40;
    }
    if ( i = = 5)
    {
    P2 = 0x12;
    P1 = 0x40;
    P0 = 0x40;
    }
    if ( i = = 6)
    {
    P2 = 0x02;
    P1 = 0x40;
    P0 = 0x40;
    }
    if ( i = = 7)
    {
    P2 = 0x78;
    P1 = 0x40;
    P0 = 0x40;
    }
    if ( i = = 8)
    {
    P2 = 0x00;
    P1 = 0x40;
    P0 = 0x40;
    }
    if ( i = = 9)
    {
    P2 = 0x10;
    P1 = 0x40;
    P0 = 0x40;
    }
    if ( i = = 10)
    {
    P2 = 0x40;
    P1 = 0x79;
    P0 = 0x40;
    i = 0;
    }
    }
    } }
    void delay( unsigned int i)
    {
    while ( i - - ) ;
    }

    2013年10月23日 15:26