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

📄 头文件.htm

📁 我的MP3 DIY 自带原代码希望各位提出宝贵意见和建议
💻 HTM
📖 第 1 页 / 共 4 页
字号:
                #define set_ERAM() AUXR=AUXR&amp;0xFD&nbsp;&nbsp;&nbsp;//使用内部扩展RAM<br>
                #define set_XRAM() AUXR=AUXR|0x02&nbsp;&nbsp;&nbsp;//使用外部RAM<br>
                <br>
                #define MP3_decoder_en()&nbsp;&nbsp;&nbsp;&nbsp;MP3CON=MP3CON|0x80&nbsp;&nbsp;&nbsp;&nbsp;//启动MP3解码器<br>
                #define MP3_decoder_disen() MP3CON=MP3CON&amp;~0x80&nbsp;&nbsp;&nbsp;//停止MP3解码器<br>
                <br>
                #define MP3_bass_boost()&nbsp;&nbsp;&nbsp;&nbsp;MP3CON=MP3CON | 
                0x40&nbsp;&nbsp;//启动重低音效果<br>
                #define MP3_no_bass_boost() MP3CON=MP3CON &amp; ~0x40 //关闭重低音效果<br>
                <br>
                #define MP3_CRC_en()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MP3CON=MP3CON 
                | 0x20&nbsp;&nbsp;//允许CRC校验<br>
                #define MP3_CRC_disen()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MP3CON=MP3CON 
                &amp; ~0x20 //禁止CRC校验<br>
                <br>
                #define MPREQ_interrupt_en()&nbsp;&nbsp;MP3CON=MP3CON &amp; 
                ~0x80&nbsp;&nbsp;//MP3数据请求中断允许<br>
                #define MPREQ_interrupt_disen()&nbsp;&nbsp;MP3CON=MP3CON | 0x80 
                //MP3数据请求不允许中断<br>
                <br>
                #define set_vol(vol)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MP3VOL=vol&nbsp;&nbsp;//设置左声道音量<br>
                #define set_vor(vor)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MP3VOR=vor&nbsp;&nbsp;//设置右声道音量<br>
                <br>
                #define set_bas(bas)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MP3BAS=bas&nbsp;&nbsp;//设置低音提升<br>
                #define set_med(med)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MP3MED=med&nbsp;&nbsp;//中音音提升<br>
                #define set_tre(tre)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MP3TRE=tre&nbsp;&nbsp;//高音提升<br>
                <br>
                #define DAC_data_request_en() AUDCON1=AUDCON1 | 0x40&nbsp;&nbsp;&nbsp;&nbsp;//允许DAC数据请求<br>
                #define DAC_data_request_disen() AUDCON1=AUDCON1 &amp; ~0x40 //不允许DAC数据请求<br>
                <br>
                #define DAC_interface_en()&nbsp;&nbsp;AUDCON1=AUDCON1 | 0x01&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//DAC接口允许<br>
                #define DAC_interface_disen() AUDCON1=AUDCON1 &amp; ~0x01&nbsp;&nbsp;&nbsp;&nbsp;//DAC借口不允许<br>
                <br>
                #define set_DAC_CLK(clk) AUDCLK=((clk)&amp;0x1F)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//设置DAC时钟<br>
                <br>
                #define pause()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DAC_data_request_disen()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//暂停<br>
                #define pause_play()&nbsp;&nbsp;DAC_data_request_en()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//从暂停中恢复播放<br>
                //这两个功能是按照51snd1的datasheet介绍做的,但是好象不能从暂停中恢复播放<br>
                <br>
                <br>
                #endif<br>
                <br>
                <br>
                /* key_board.h file<br>
                &nbsp;&nbsp;&nbsp;Created by Computer-lov Date: 2005.3.19<br>
                &nbsp;&nbsp;&nbsp;Copyright (c) 2005 Computer-lov<br>
                &nbsp;&nbsp;&nbsp;version 1.0<br>
                */<br>
                <br>
                #ifndef __KEY_BOARD_H__<br>
                #define __KEY_BOARD_H__<br>
                <br>
                extern unsigned char key;<br>
                <br>
                void ISR_keyboard(void);<br>
                <br>
                #define KEY_UP&nbsp;&nbsp;&nbsp;1<br>
                #define KEY_FUN&nbsp;&nbsp;2<br>
                #define KEY_DOWN 3<br>
                #define KEY_OK&nbsp;&nbsp;&nbsp;4<br>
                <br>
                #endif<br>
                <br>
                <br>
                /* MP3.H File<br>
                &nbsp;&nbsp;&nbsp;Created by Computer-lov date: 2005.3.19<br>
                &nbsp;&nbsp;&nbsp;Copyright (c) 2005 Computer-lov<br>
                &nbsp;&nbsp;&nbsp;version 1.0<br>
                */<br>
                <br>
                #ifndef __MP3_H__<br>
                #define __MP3_H__<br>
                <br>
                #define START&nbsp;&nbsp;0<br>
                #define PLAY&nbsp;&nbsp;&nbsp;1<br>
                #define PAUSE&nbsp;&nbsp;2<br>
                #define STOP&nbsp;&nbsp;&nbsp;3<br>
                #define USB&nbsp;&nbsp;&nbsp;&nbsp;4<br>
                <br>
                #define FUN_SEL&nbsp;&nbsp;0<br>
                #define FUN_VOL&nbsp;&nbsp;1<br>
                #define FUN_BAS&nbsp;&nbsp;2<br>
                #define FUN_MED&nbsp;&nbsp;3<br>
                #define FUN_TRE&nbsp;&nbsp;4<br>
                #define FUN_BOOT 5<br>
                #define FUN_MAX&nbsp;&nbsp;6<br>
                <br>
                extern unsigned char status;<br>
                extern unsigned char function,vol,bas,med,tre;&nbsp;&nbsp;//保存音量等设置<br>
                <br>
                void play(void);<br>
                void DAC_start(unsigned char);<br>
                <br>
                #endif<br>
                <br>
                <br>
                <br>
                <p align="center"> 
                <p> </p>
                <p><font color="#336699"><strong>签名:</strong></font><br>
                <div align="right">
                  <table cellSpacing="0" cellPadding="0" border="0">
                    <tbody>
                      <tr>
                        <td class="text9"><font color="#ff0000">声明:本人所有发言均为个人观点。由此贴带来的后果,<br>
                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;本人一般不予负责。在您相信本贴之前,请慎重考虑!<br>
                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;computer00</font></td>
                      </tr>
                    </tbody>
                  </table>
                </div>
                <p> </p>
              </td>
            </tr>
          </tbody>
        </table>
        <br>
      </td>
    </tr>
  </tbody>
</table>
<img height="5" src="blank.gif" width="1"><br>
<center>
<table cellSpacing="3" cellPadding="0" align="center" border="0">
  <tbody>
    <tr>
      <td><script language="javascript">
function getRandomKey(num)
{
	var Pkey,i,Seed;
	Pkey = "";
	for (i=1;i<=num;i++)
	{
		Seed = Math.floor((Math.random() * 10));
		Pkey = Pkey + Seed;
	}
	return Pkey;
}

var rkey = getRandomKey(6);
function fengfeng()
{
	document.write('<A HREF="http://ad.doubleclick.net/jump/N2486.Simplified_Chinese/B1514097;sz=468x60;ord=' + rkey + '" target=_blank><IMG SRC="http://ad.doubleclick.net/ad/N2486.Simplified_Chinese/B1514097;sz=468x60;ord=' + rkey + '" BORDER=0 WIDTH=468 HEIGHT=60 ALT="Click Here"></A>');
}
fengfeng();
</script>
        <a href="http://ad.doubleclick.net/jump/N2486.Simplified_Chinese/B1514097;sz=468x60;ord=531345" target="_blank"><img alt="Click Here" src="http://ad.doubleclick.net/ad/N2486.Simplified_Chinese/B1514097;sz=468x60;ord=531345" border="0" width="468" height="60"></a></td>
    </tr>
  </tbody>
</table>
</center>
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
  <tbody>
    <tr>
      <td class="pagehead" noWrap>相关帖子</td>
    </tr>
  </tbody>
</table>
<ul>
</ul>
<ul>
  <li><span class="text9"><img src="mood24.gif" width="20" height="20"> <a href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&amp;ID=1581327" target="_self">我做的硬盘MP3出声了 
    </a>- computer00 <em>2005-3-24 20:30:09</em> <font color="darkblue">[ID:1581327 
    点击:271]</font> (848 Bytes) <font color="red">(15)</font></span>
    <ul>
      <li><span class="text9"><img src="mood25.gif" width="20" height="20"> <a href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&amp;ID=1586669" target="_self">牛。 
        </a>- jouden <em>2005-3-29 9:38:51</em> <font color="darkblue">[ID:1586669 
        点击:28]</font> (26 Bytes) <font color="red">(0)</font> </span><img src="new.gif" width="10" height="10">
      <li><span class="text9"><img src="mood24.gif" width="20" height="20"> 头文件 - computer00 <em>2005-3-28 
        20:03:01</em> <font color="darkblue">[ID:1586097 点击:52]</font> 
        (17562 Bytes) <font color="red">(0)</font> </span><img src="new.gif" width="10" height="10">
      <li><span class="text9"><img src="mood24.gif" width="20" height="20"> <a href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&amp;ID=1586082" target="_self">既然有人需要,我还是把源程序贴出来吧,仅供参考 
        </a>- computer00 <em>2005-3-28 19:54:50</em> <font color="darkblue">[ID:1586082 
        点击:62]</font> (30344 Bytes) <font color="red">(0)</font> </span><img src="new.gif" width="10" height="10">
      <li><span class="text9"><img src="mood25.gif" width="20" height="20"> <a href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&amp;ID=1585744" target="_self">89C51SND1C 
        </a>- LANYUN <em>2005-3-28 16:07:27</em> <font color="darkblue">[ID:1585744 
        点击:61]</font> (43 Bytes) <font color="red">(0)</font> </span><img src="new.gif" width="10" height="10">
      <li><span class="text9"><img src="mood25.gif" width="20" height="20"> <a href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&amp;ID=1585275" target="_self">能把你的IDE 
        的驱动文件共享吗? </a>- MARY HUANG <em>2005-3-28 12:23:38</em> 
        <font color="darkblue">[ID:1585275 点击:73]</font> (112 Bytes) <font color="red">(0)</font> 
        </span><img src="new.gif" width="10" height="10">
      <li><span class="text9"><img src="mood25.gif" width="20" height="20"> <a href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&amp;ID=1584908" target="_self">请问软件问题? 
        </a>- henrywhale <em>2005-3-28 9:29:53</em> <font color="darkblue">[ID:1584908 
        点击:78]</font> (91 Bytes) <font color="red">(0)</font> </span><img src="new.gif" width="10" height="10">
      <li><span class="text9"><img src="mood23.gif" width="20" height="20"> <a href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&amp;ID=1584453" target="_self">电路其实不复杂,关键是软问题:) 
        &lt;无内容&gt;</a> - blueice119 <em>2005-3-27 18:30:17</em> <font color="darkblue">[ID:1584453 
        点击:86]</font> (0 Bytes) <font color="red">(0)</font></span>
      <li><span class="text9"><img src="mood25.gif" width="20" height="20"> <a href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&amp;ID=1583597" target="_self">电路有这么简单吗? 
        &lt;无内容&gt;</a> - bbkshh <em>2005-3-26 19:14:52</em> <font color="darkblue">[ID:1583597 
        点击:96]</font> (0 Bytes) <font color="red">(0)</font></span>
      <li><span class="text9"><img src="mood23.gif" width="20" height="20"> <a href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&amp;ID=1582699" target="_self">电脑,恭喜了!! 
        </a>- blueice119 <em>2005-3-25 20:55:12</em> <font color="darkblue">[ID:1582699 
        点击:127]</font> (173 Bytes) <font color="red">(0)</font></span>
      <li><span class="text9"><img src="mood25.gif" width="20" height="20"> <a href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&amp;ID=1581693" target="_self">高手 
        &lt;无内容&gt;</a> - foragain <em>2005-3-25 9:28:00</em> <font color="darkblue">[ID:1581693 
        点击:160]</font> (0 Bytes) <font color="red">(0)</font></span>
      <li><span class="text9"><img src="mood25.gif" width="20" height="20"> <a href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&amp;ID=1581672" target="_self">能给我份 
        软件吗. </a>- 老人家 <em>2005-3-25 9:15:54</em> <font color="darkblue">[ID:1581672 
        点击:166]</font> (100 Bytes) <font color="red">(0)</font></span>
      <li><span class="text9"><img src="mood25.gif" width="20" height="20"> <a href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&amp;ID=1581649" target="_self">高手... 
        </a>- 老人家 <em>2005-3-25 9:07:19</em> <font color="darkblue">[ID:1581649 
        点击:165]</font> (7 Bytes) <font color="red">(0)</font></span>
      <li><span class="text9"><img src="mood24.gif" width="20" height="20"> <a href="http://www.21icbbs.com/club/bbs/ShowAnnounce.asp?v=&amp;ID=1581356" target="_self">有几个问题想问一下用过AT89C51SND1C的人 
        </a>- computer00 <em>2005-3-24 20:55:52</em> <font color="darkblue">[ID:1581356 
        点击:200]</font> (448 Bytes) <font color="red">(1)</font></span></li>
    </ul>
    <ul>
    </ul>
    <ul>
    </ul>
    <img height="5" src="blank.gif" width="1"><br>
    <br>
    <table cellSpacing="0" cellPadding="0" width="100%" align="center">
      <tbody>
        <tr>
          <td align="middle"><img height="4" src="blank.gif" width="1" border="0"><br>
          </td>
        </tr>
      </tbody>
    </table>
  </li>
</ul>

</body>

</html>

⌨️ 快捷键说明

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