⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 isd1700.lst

📁 ISD 语音芯片的驱动程序。 原有产品已经停产
💻 LST
📖 第 1 页 / 共 2 页
字号:
C51 COMPILER V8.02   ISD1700                                                               02/20/2008 15:45:24 PAGE 1   


C51 COMPILER V8.02, COMPILATION OF MODULE ISD1700
OBJECT MODULE PLACED IN isd1700.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE isd1700.c BROWSE DEBUG OBJECTEXTEND

line level    source

   1          #include "Includes.h"
*** WARNING C318 IN LINE 1 OF isd1700.c: can't open file 'Includes.h'
   2          //unsigned char   ISDEvent=0;
   3          //unsigned char   ISDEvent2=0;
   4          
   5          #define uint  unsigned int
   6          #define uchar unsigned char
   7          
   8          
   9          void delay_50us(uint time1)
  10          {
  11   1          unsigned char i;
  12   1          for(time1;time1>0;time1--)
  13   1          {
  14   2              //for(i=0;i<12;i++)     22.1184
  15   2              for(i=0;i<6;i++)       //11.0592  2007.12.03
  16   2              {
  17   3                 _nop_();
*** WARNING C206 IN LINE 17 OF ISD1700.C: '_nop_': missing function-prototype
*** ERROR C264 IN LINE 17 OF ISD1700.C: intrinsic '_nop_': declaration/activation error
  18   3              }
  19   2          }
  20   1      }
  21          
  22          void delay(uint msec)
  23          {
  24   1          for (msec; msec > 0; msec--)
  25   1          {
  26   2      //        clrwatchdog();
  27   2              delay_50us(20);
  28   2          }
  29   1      }
  30          
  31          uchar spio(uchar BUF_ISD) //shaoliang
  32          {
  33   1       uchar i,dat=BUF_ISD;
  34   1       SCLK=1;
*** ERROR C202 IN LINE 34 OF ISD1700.C: 'SCLK': undefined identifier
  35   1       SS=0;
*** ERROR C202 IN LINE 35 OF ISD1700.C: 'SS': undefined identifier
  36   1       for(i=0;i<8;i++)
  37   1       {
  38   2               SCLK=0;
*** ERROR C202 IN LINE 38 OF ISD1700.C: 'SCLK': undefined identifier
  39   2               _nop_(); _nop_();_nop_(); _nop_(); _nop_();
  40   2                if(dat&0X01)  MOSI=1;
*** ERROR C202 IN LINE 40 OF ISD1700.C: 'MOSI': undefined identifier
  41   2                else                  MOSI=0;
*** ERROR C202 IN LINE 41 OF ISD1700.C: 'MOSI': undefined identifier
  42   2               dat>>=1;
  43   2               if(MISO)
*** ERROR C202 IN LINE 43 OF ISD1700.C: 'MISO': undefined identifier
  44   2                  dat=(dat|0X80);
  45   2                SCLK=1;
*** ERROR C202 IN LINE 45 OF ISD1700.C: 'SCLK': undefined identifier
C51 COMPILER V8.02   ISD1700                                                               02/20/2008 15:45:24 PAGE 2   

  46   2                _nop_(); _nop_(); _nop_(); _nop_();_nop_();
  47   2       }
  48   1       MOSI=0;
*** ERROR C202 IN LINE 48 OF ISD1700.C: 'MOSI': undefined identifier
  49   1       return(dat);
  50   1      }
  51           void rdstatus()
  52          {
  53   1       spio(0x05);
  54   1       spio(0x00);
  55   1       spio(0x00);
  56   1       SS=1;
*** ERROR C202 IN LINE 56 OF ISD1700.C: 'SS': undefined identifier
  57   1       //delay(100);               //延迟100ms
  58   1       //SR0_L=spio(0x05);
  59   1       //SR0_H=spio(0x00);
  60   1       //SR1=spio(0x00);
  61   1      }
  62          void clrint()
  63          {
  64   1              spio(0x04);             spio(0x00);             SS=1;
*** ERROR C202 IN LINE 64 OF ISD1700.C: 'SS': undefined identifier
  65   1      
  66   1      }
  67          void pu()                //power up
  68          {
  69   1         spio(0x01);          spio(0x00);             SS=1;
*** ERROR C202 IN LINE 69 OF ISD1700.C: 'SS': undefined identifier
  70   1          delay(120);
  71   1          //delay(60);
  72   1      }
  73          void pd()           //power down
  74          {
  75   1              spio(0x07);             spio(0x00);     SS=1;
*** ERROR C202 IN LINE 75 OF ISD1700.C: 'SS': undefined identifier
  76   1              delay(100);
  77   1      }
  78          void reset()
  79          {
  80   1              spio(0x03);             spio(0x00);     SS=1;
*** ERROR C202 IN LINE 80 OF ISD1700.C: 'SS': undefined identifier
  81   1              delay(100);
  82   1      }
  83          void chk_mem()
  84          {
  85   1              spio(0x49);             spio(0x00);             SS=1;    delay(150);
*** ERROR C202 IN LINE 85 OF ISD1700.C: 'SS': undefined identifier
  86   1      }
  87          
  88          void wr_apc2()          //aux输出    音量最大000   command               d7:d0     d11:d8
  89          {
  90   1              unsigned char SR0_L;
  91   1      
  92   1              spio(0x65);     spio(0x80);             spio(0x04);             // d7:d0   d11:d8
  93   1              SS=1;  delay(5) ;
*** ERROR C202 IN LINE 93 OF ISD1700.C: 'SS': undefined identifier
  94   1      
  95   1                  spio(0x05);
  96   1                      spio(0x00);
  97   1                      spio(0x00);
  98   1                       SS=1;
*** ERROR C202 IN LINE 98 OF ISD1700.C: 'SS': undefined identifier
C51 COMPILER V8.02   ISD1700                                                               02/20/2008 15:45:24 PAGE 3   

  99   1      
 100   1                       SR0_L=0;
 101   1               SR0_L=spio(0x05);
 102   1      
 103   1                       if((SR0_L&0x01)==0x01)
 104   1                       {
 105   2                       wr_apc2();
 106   2                       }
 107   1              wr_nvcfg();
 108   1      }
 109          
 110          
 111          void wr_apc1()          //线路输入, aux 输出
 112          {
 113   1              spio(0x45);     spio(0xc0);             spio(0x04);             // d7:d0   d11:d8
 114   1              SS=1;  delay(1) ;
 115   1      }
 116          /*
 117          void rd_apc()
 118          {
 119           spio(0x44);spio(0x00); spio(0x00);spio(0x00);
 120           SS=1;
 121           spio(0x44);spio(0x00); APCL=spio(0x00);APCH=spio(0x00);
 122          }
 123          
 124          void playall()
 125          {
 126                  spio(0x40);             spio(0x00);             SS=1;
 127          }
 128          
 129          void rec()
 130          {
 131           spio(0x41);   spio(0x00);         SS=1;
 132          }
 133          void erase()
 134          {
 135                  spio(0x42);             spio(0x00);             SS=1;
 136          }
 137          
 138          void eraseall()
 139          {
 140                  spio(0x43);             spio(0x00);             SS=1;
 141          }
 142          void rd_play_ptr()
 143          {
 144                  spio(0x06);             spio(0x00);             spio(0x00);             spio(0x00);
 145                  SS=1;
 146          }
 147          void devid()
 148          {
 149                  spio(0x09);spio(0x00);spio(0x00);
 150                  SS=1;
 151                  spio(0x09);spio(0x00);ID=spio(0x00);
 152          }
 153          
 154          senddata()
 155          {
 156                  SBUF=SR0_L;             while(TI==0);   TI=0;
 157                  SBUF=SR0_H ;    while(TI==0);   TI=0;
 158                  SBUF=SR1;       while(TI==0);   TI=0;
 159          }
 160          */
C51 COMPILER V8.02   ISD1700                                                               02/20/2008 15:45:24 PAGE 4   

 161          void stop()
 162          {
 163   1              spio(0x02);spio(0x00); SS=1;
 164   1      }
 165          
 166          /*void setplay(uchar segment)
 167          {
 168                  stop();
 169                  clrint();
 170                  chk_mem();
 171                  switch (segment)
 172              {
 173                  case 1:
 174                      spio(0x80);spio(0x00); spio(0x10);spio(0x00);spio(0x2a);spio(0x00);SS=1;
 175                      break;
 176                  case 2:
 177                      spio(0x80);spio(0x00); spio(0x2B);spio(0x00);spio(0x41);spio(0x00);SS=1;
 178                      break;
 179                  case 3:
 180                      spio(0x80);spio(0x00); spio(0x42);spio(0x00);spio(0x4e);spio(0x00);SS=1;
 181                      break;
 182                          case 4:
 183                      spio(0x80);spio(0x00); spio(0x4F);spio(0x00);spio(0x62);spio(0x00);SS=1;
 184                      break;
 185                          case 5:
 186                      spio(0x80);spio(0x00); spio(0x63);spio(0x00);spio(0x70);spio(0x00);SS=1;
 187                      break;
 188                          case 6:
 189                      spio(0x80);spio(0x00); spio(0x71);spio(0x00);spio(0x80);spio(0x00);SS=1;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -