www.pudn.com > VoiceRecognition.zip > RP_Demo.c


/********************************************************************* 
  
  (c) copyright Extell Company 2001  
  ALL RIGHTS RESERVED 
  
 ********************************************************************* 
        ESR-700 Demonstration Program for Voice Recognition Application 
 ********************************************************************* 
 
  File:		RP_Demo.c 
  
  Project:      ESR-700 demo program for Voice Recognition Application 
  
  Description:  Record&Play Main Program 
  
  Date:         Sep. 2001 
    
 ********************************************************************/ 
#include  
#include "extell51.h" 
#include "recog.h" 
 
#include "beep1.h" 
#include ".\RP_Sound\strecord.h" 
#include ".\RP_Sound\norecord.h" 
#include ".\RP_Sound\delmem.h" 
 
 
#define	RECORD_LENGTH	0xf000 // 6kbyte -- about 2.0sec 
 
unsigned char xdata recordtbl[RECORD_LENGTH] _at_ (0x440);	 
 
 
void init() 
{ 
	ESRInitial(); 
	SetPowerDown(ADC_PD| DAC_PD| PRE_AMP_PD| PR2_PD| MUL_PD| PR1_PD,1); 
	 
	TH1 = 0xfb;		// f3(4800), fb(12800) 
	TL1 = 0xff; 
	PCON = 0x80; 
	TMOD = 0x22; 
	SM0 = 0; 
	SM1 = 1; 
	TI = 1; 
	RI = 1; 
	TR1 = 1; 
	REN = 1; 
	EA = 1; 
	IT1 = 1; 
	 
} 
 
void delay(unsigned int count) 
{ 
	unsigned int data i; 
	for(i=0;i