專注差異化嵌入式產(chǎn)品解決方案 給智能產(chǎn)品定制注入靈魂給予生命
提供開發(fā)工具、應(yīng)用測試 完善的開發(fā)代碼案例庫分享
從全面的產(chǎn)品導(dǎo)入到強(qiáng)大技術(shù)支援服務(wù) 全程貼心伴隨服務(wù),創(chuàng)造無限潛能!
關(guān)于 ISD4002 語音錄放的原程序,前段時(shí)間搞了好久,結(jié)果是自己搞的太亂了,現(xiàn)在這個(gè)程序是調(diào)試好的,現(xiàn)在已經(jīng)在做了,不過是51的,大家改下就可以用在 PIC 上了,因?yàn)槲覜]有檫寫芯片,市場也沒找到,就買了個(gè) 89C2051試 了.
;4002-120 錄音程序 (不分段一次性錄完直到 OVF標(biāo)志----指示ISD的錄、放操作已到達(dá)存儲器的未尾。結(jié)束) ; this is a basic recore and play programe if you want add other control plaease do it yourself. by LINPO Andy Tks ! SS EQU P1.0 SCLK EQU P1.1 MOSI EQU P1.2 LED EQU P1.7 AN EQU P1.6 STOP EQU P1.5 PR EQU P1.4 ADDRESSL EQU 30H CANDAH EQU 31H RECORC EQU 32H SIG EQU 33H PANDAH EQU 34H PLAYC EQU 35H
ORG 0000H AJMP START ORG 0030H START: MOV P1,#0FFH MOV P3,#0FFH MAIN: SETB LED KEY: JB AN,KEY LCALL DELAY_20ms JB AN,KEY JNB PR,PLAY AJMP RECORD ;///////////////////////////// RECORDING /////////////// RECORD: ACALL POWERUP ACALL DELAY_30ms ACALL POWERUP ACALL DELAY_30ms ACALL DELAY_30ms CLR SS MOV ADDRESSL,#50H MOV CANDAH,#0A0H MOV A,ADDRESSL ACALL SEND MOV A,CANDAH ACALL SEND SETB SS CLR SS MOV RECORC,#0B0H MOV A,RECORC ACALL SEND CLR LED SETB SS KEY1: JNB P3.2,STOPRE JB AN,KEY1 LCALL DELAY_20ms JB AN,KEY1 STOPRE: SETB LED CLR SS MOV A,#10H ACALL SEND SETB SS AJMP MAIN ;////////////////////////////////////// PLAY AUDIO //////////////////////////// PLAY: ACALL POWERUP ACALL DELAY_30ms CLR SS MOV ADDRESSL,#70H MOV PANDAH,#0E0H MOV A,ADDRESSL ACALL SEND MOV A,PANDAH ACALL SEND SETB SS CLR SS MOV PLAYC,#0F0H MOV A,PLAYC ACALL SEND SETB SS CLR LED
KEY2: JNB P3.2,STOPRE JB STOP,KEY2 ACALL DELAY_20ms JB STOP,KEY2 AJMP STOPRE
POWERUP: MOV A,#20H CLR SS ACALL SEND SETB SS RET ;/////////////////////// TRANSLATION DATA ///////////////////////// SEND: CLR SCLK CLR MOSI MOV R1,#08H OUT: CLR SCLK ;時(shí)鐘下降 RRC A MOV MOSI,C ;輸出1位 NOP NOP NOP SETB SCLK NOP NOP NOP DJNZ R1,OUT RET
DELAY_30ms: MOV R1,#40H DL: MOV R2,#0FFH DJNZ R2,$ DJNZ R1,DL RET DELAY_20MS: MOV R1,#30H DL1: MOV R2,#0FFH DJNZ R2,$ DJNZ R1,DL1 RET END