基于AT89C51SND1的MP3的程序设计(包括播放mp3和录音功能)

源代码在线查看: board.h

软件大小: 1052 K
上传用户: shkk21
关键词: SND1 89C C51 SND
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*H**************************************************************************
				* NAME:         board.h         
				*----------------------------------------------------------------------------
				* Copyright (c) 2003 Atmel.
				*----------------------------------------------------------------------------
				* RELEASE:      snd1c-refd-nf-4_0_3      
				* REVISION:     1.17     
				*----------------------------------------------------------------------------
				* PURPOSE:
				* This file contains the demonstration board definition
				*****************************************************************************/
				
				#ifndef _BOARD_H_
				#define _BOARD_H_
				
				
				/*_____ I N C L U D E S ____________________________________________________*/
				
				#include "lib_mcu\kbd\kbd_drv.h"            /* keyboard driver definition */
				
				/*_____ M A C R O S ________________________________________________________*/
				
				
				/*----- Board definition -----*/
				
				/* BOARD VERSION */
				#define VERSION         36                  /* Version */
				#define REFD
				
				/* DAC */#define DAC_MUTE        P3_5                /* DAC mute port */
				#define DAC_APPSEL      P5_3                /* DAC AppSel */
				#define DACTEST      P3_2                /* DAC AppSel */
				#define DAC_DEEM        P2_6                /* DAC de-emphasis port */
				#define DAC_INVCLK      P3_5                /* DAC Clock select: 256fs-384fs */
				#define DAC_SF0         P2_7         
				#define DAC_SF1         P2_5
				#define DAC_NB_BIT      20                  /* 20-bit DAC */
				// DAC in L3 mode
				#define DAC_TEST        DAC_MUTE
				#define DAC_L3CLOCK     DAC_DEEM
				#define DAC_L3MODE      DAC_SF0
				#define DAC_L3DATA      DAC_SF1
				#define DAC_L3I_ADDR    3
				/* ADC */
				#define AD_CLOCK        (FPER / F_CONV_MAX / 2) /* ADC clock divider */
				#define BATTERY_CHANNEL (AIN0)              /* battery: ADC input 0 */
				#define VOICE_CHANNEL   (AIN1)              /* voice: ADC input 1 */
				
				/* Enable USB */
				
				#define ENA_USB         P3_0
				
				/* Shutdown MIC */
				#define SHUT_MIC        P5_2
				
				/* Shutdown POWER */
				#define SHUT_PWR        P3_1
				
				/* NAND Flash (NF extended version) */
				#define NF_64
				#define NF_IDLE_STATE_ADD         0xF9      /* memory selected */
				#define NF_ADD_LATCH_ENABLE_ADD   0xF300    /* Address Latch Enable Address */
				#define NF_CMD_LATCH_ENABLE_ADD   0xF500    /* Command Latch Enable Address */
				#define NF_ADDRESS_CMD_DATA       0xF100    /* Command / Data Address register */
				#define NF_RD_BUSY                P2_4
				#define Nf_CS_ON()                (P2_3 = 0)
				#define Nf_CS_OFF()               (P2_3 = 1)
				#define FLASH_WP        P2_0
				
				/* Key Definition */
				#define KEY_FUNC        KEY_0_0             /* 02h Function select */
				#define KEY_VALID       KEY_0_1             /* 0Ah Stop select */
				
				#define KEY_PLUS        KEY_1_0             /* 01h + */
				#define KEY_MINUS       KEY_1_1             /* 09h - */
				
				
				#define KEY_SOUND       0xE0                /* sound select */
				#define KEY_MEM         0xE1                /* memory select */
				#define KEY_SPARE       0xE2                /*  */
				#define KEY_REPEAT      0xE3                /* repeat set / unset */
				#define KEY_PARENT      0xe4                /* parent directory */
				
				#define KEY_INC         0xBF                /* + */
				#define KEY_PREV        0xE6                /* Previous */
				#define KEY_NEXT        0xE7                /* Next */
				#define KEY_PLAY        0xE8                /* Play or enter directory */
				#define KEY_PAUSE       0xE9                /* Pause */
				#define KEY_ENTER       0xEA                /* Enter in menu */
				
				#define KEY_DEC         0xEF                /* - */
				#define KEY_REC         0xEC                /* Record */
				#define KEY_STOP        0xED                /* Stop */
				#define KEY_MODE        0xED                /* Mode */
				
				
				/*_____ D E F I N I T I O N ________________________________________________*/
				
				
				/*_____ D E C L A R A T I O N ______________________________________________*/
				
				
				#endif    /* _BOARD_H_ */
							

相关资源