Maker Pro
Maker Pro

ISD4002 voice ic working with 8051

Y

yoyoteng

Jan 1, 1970
0
--We are trying to let ISD4002 work with 8051
--below is our source code-------------------


SS .reg p2.0
MOSI .reg P2.1
MISO .reg P2.2
SCLK .reg P2.4
PUSH .reg P2.5

org 0
mov p0,#00000000b
jmp Start

Start: mov sp,#6fh ;
;---------------test------------------------------------
mov r3,#7 ; runs a shift of light at startup
mov a,#11111110b ;
Left: mov p1,a ;
call delay ;
rl a ;
djnz r3,Left
;---------test-end-----------------------------------------
;--------main-----------
mov a,#00000000b
mov p2,a
setb PUSH
PUSH_1:
jb PUSH,PUSH_1
clr SS ; SS low
power:
mov a,#00000000b ; powers up the ISD4002
call Go
mov a,#00000100b
call Go
REC:
mov a,#00000000b ; set the ISD4002 to record
call Go
mov a,#00000101b
call Go
PLAY: ;
mov a,#00000000b
call Go
mov a,#00001111b
call Go
jmp Start
;--------main-end-----
;-------------set-mosi-----------
Go: mov r5,#8
GO_1: rlc a
mov MOSI,C
call clk
djnz r5,GO_1
ret
;-------------set-mosi-end-------------
;--------clk------------
clk:
call cpush ;-----------判斷是否繼續按
setb SCLK
call delay
cpl SCLK
call delay
ret
;--------delay-----0.001sec-1KHz--------
delay:
mov r7,#1
djnz r7,delay

ret
;--------delay-end----------------------------------

;--------check-push--------------
cpush:
jb PUSH,STOP
ret
;--------check-push-end----------------------
;-------stop----------------
STOP:
mov a,#00000000b
call Go_2
mov a,#00001100b
call Go_2
jmp PLAY
;****jmp Start

Go_2: mov r5,#8
GO_3: rlc a
mov MOSI,C
call clk_1
djnz r5,GO_3
ret
clk_1:
setb SCLK
call delay
cpl SCLK
call delay
ret
;-----------------------------------------
end


;----we do not know where it went wrong, the
;---SCLK could not be picked up by a LOGIC PROBE, nor oscillator.

;---any suggestion?
thanks for finishing browsing my question.


(ISD4002datasheet link www.winbond-usa.com/products/isd_products/
chipcorder/datasheets/I4002Rev1.pdf )
 
W

William P.N. Smith

Jan 1, 1970
0
--We are trying to let ISD4002 work with 8051
--below is our source code------------------- [...]
;----we do not know where it went wrong, the
;---SCLK could not be picked up by a LOGIC PROBE, nor oscillator.

If the oscillator (look at the output, if you load the input with a
logic probe, it may not run) isn't running, then you have a hardware
problem, not a software one...

Also, when you say "could not be picked up", you mean neither the high
or the low LED lit up?
 
Y

yoyoteng

Jan 1, 1970
0
William P.N. Smith wrote in message news: said:
[...]

If the oscillator (look at the output, if you load the input with a
logic probe, it may not run) isn't running, then you have a hardware
problem, not a software one...

Also, when you say "could not be picked up", you mean neither the high
or the low LED lit up?

Thank you for replying.
We got it to work the next morning.
It's been a long time, and I forgot why we got stuck.

The oscillator clearly monitored the 8051 output (SS_bar, SCLK) and
the MISO from ISD4002 was insync with the MOSI which we gave from 8051.

We first tried to record and play with a 1Khz 3(peak to peak) VOlt signal,
It was amazing(We are a bunch of College juniors, who haven't took any assembly
laguage courses).

Anyway, thank you again for replying.

p.s.
We are now trying to optimize the recording part, with a preamp mic w/ LM386.
 
Top