PDA

View Full Version : Pic+isd4002



eyalf
- 25th December 2004, 18:59
hi fellows,

i'm new to this forum, and thank you for being there.
before i elaborate more,
has anyone wokred with the PIC as a controller of the ISD4002 (or of the 4000 series) chipcorder? if so, can i verify the I/O pind between the two devices with you?

thanks, and a very merry xmas,

eyal.

mister_e
- 27th December 2004, 01:39
For sure you can, simply post the exact things you're looking for ;)

eyalf
- 28th December 2004, 18:41
hi Steve,

thanx for the reply.

so:
as far as i can tell, connection-wise, there should be 4 pins connecting the PIC and the chipcorder.

from the PIC: RB4/5/6/7 (pins # 10-13).
from the ISD: SS, SCLK, MOSI, MISO (pins # 1,2,3, 28).

could you (or anyone else) verify that from your knowledge or experience?

also, the non-programmer that i am, I want to use JAL to do the coding. I've used it sporadically before, but never with the microcontroller AND a sound chip. would anyone have suggestions/shortcuts/no-no's before i sink in?

thanks again, and try to stay in high places :-O
eyal.

mister_e
- 29th December 2004, 01:34
Your pinout can be almost everything ther since i don't know wich PIC you'll be using for this project.

The important part for the code... JAL... i don't know that, never heard about it, so i can't help with anything on that.

I, and most here, use Melabs PICBASIC PRO v2.45.

BUT i've some ISD4002 somewhere here under the dust. I buy those several years ago and i think it's now the time for me to give a try with them. I'll let you know when something will work.

eyalf
- 29th December 2004, 08:05
thanks Steve,

the pic i'm using is the 16f876. JAL (Just Another Language) is a cute little Assembler-based code and compiler.
try http://www.voti.nl/jal/. I just never tried it with a chipcorder.

mister_e
- 29th December 2004, 17:22
i just have a really fast look to this. Try to find something in JAL who can gives you SPI or Microwire protocol read/write. That's all i can tell you for now. BTW i'm begining in a few hours some code line to do some playback/record from this chip.

You can give a try with the free PBP compiler on http://www.compilespot.com/startdemo.htm too.

i agree it's a bit limited, but that way, everybody here will be able to help you for your project.

eyalf
- 30th December 2004, 09:12
I'll try, Steve, thanx.

julioelectronic
- 1st September 2005, 23:04
i need a correct interface to connect 16f877a and isd4002

mister_e
- 2nd September 2005, 04:15
Just a teaser. I'll not post the whole thing, just the pin assignement.


' LCD definition
' ==============
'
DEFINE LCD_DREG PORTA '
DEFINE LCD_DBIT 0 ' LCD data port : PORTA<3:0>
'
DEFINE LCD_EREG PORTA '
DEFINE LCD_EBIT 6 ' LCD enable bit : PORTA.6
'
DEFINE LCD_RSREG PORTA '
DEFINE LCD_RSBIT 7 ' LCD RS bit : PORTA.7


' I/O Definition
' ===============
'
TRISA = %00110000 ' PORTA Output on :
' PORTA<3:0> : LCD data
' PORTA<7:6> : LCD RS & E bit
'
' PORTA Input on :
' PORTA.4 : "ALT PLAY" Button
' PORTA.5 : "PLAY" button
'
TRISB = %11110001 ' PORTB Output on :
' PORTB.1 : ISD4002 SS pin
' PORTB.2 : ISD4002 SCLK pin
' PORTB.3 : ISD4002 MOSI pin
'
' PORTB Input on :
' PORTB.0 : ISD4002 INT pin
' PORTB.4 : ISD4002 MISO pin
' PORTB.5 : ISD4002 RAC pin
' PORTB.6 : "SETUP" button
' PORTB.7 : "RECORD" button
OPTION_REG.7 = 0 ' enable pull-up on PORTB
CMCON = 7 ' disable analog comparator


' Variable definition
' ===================
'
AltPlay var PORTA.4 ' "ALT PLAY" button
Play var PORTA.5 ' "PLAY" button
Setup var PORTB.6 ' "SETUP" button
Record var PORTB.7 ' "RECORD" button
INT var PORTB.0 ' ISD4002 INT pin
SS var PORTB.1 ' ISD4002 SS pin
SCLK var PORTB.2 ' ISD4002 SCLK pin
MOSI var PORTB.3 ' ISD4002 MOSI pin
MISO var PORTB.4 ' ISD4002 MISO pin
RAC var PORTB.5 ' ISD4002 RAC pin

Was setup on 16F628, you'll need to use SHIFTIN/SHIFTOUT

anderson037
- 2nd September 2005, 23:29
The melabs LAB-XT board has a socket for this family of ISD chip. You can download the schematic and sample code:

http://melabs.com/products/labxt.htm

julioelectronic
- 10th September 2005, 20:56
I watch the circuit that you recommended to me anderson , but the only thing that my circuit do, are sounds when pic send the pulses to isd, good i will continue treating, thanks for the help.

mister_e
- 11th September 2005, 00:38
http://www.picbasic.co.uk/forum/search.php?searchid=56714

julioelectronic
- 18th September 2005, 00:21
ok amigos it works, my error was software, ss enable/ disable.

leejongfan
- 23rd September 2008, 17:11
Hi,
I am using PIC16f877
I think we have to program in SPI mode,right?
for SPI, we only can send 8 bit at one time, but the opcode need 16 bits.
Am I right to say we cannot use PIC16f877

angie14
- 12th November 2012, 22:35
hi, i want to know how to program a ISD 4002 to record some files and play them

mister_e
- 13th November 2012, 06:40
there's plenty code example in here for various ISD chips, read the according datasheet along with existing code example, and you should be good.

Case not, provide YOUR OWN code example in here and someone might give more hints.

peterdeco1
- 13th November 2012, 17:15
I work with the ISD5008 mostly. You can send 16 bits like this: ShiftOut PORTC.5,PORTC.3,0,[9021\16] 'RECORD CONFIG0

angie14
- 14th November 2012, 05:32
currently I made the next circuit
6733
i found in this page http://hem.passagen.se/communication/speach.html
and I find the next firm for the pic

#include <REGX52.H>

#include <string.h>

#include <stdio.h>

#include <absacc.h>

#include <intrins.h>

sbit ss=P1^0;

sbit mosi=P1^1;

sbit sclk=P1^4;

void delay_ms(unsigned int ms)

{

unsigned char i;

while(ms--)

{

i=112;

while(i--);

}

}

void spi_mosi(unsigned char spi_data)

{

unsigned char BitCnt;

mosi=0;

sclk=0;

for(BitCnt=0;BitCnt<8;BitCnt++)

{

sclk=0;

_nop_();

if((spi_data>>BitCnt)&0x01)

mosi=1;

else

mosi=0;

_nop_();

_nop_();

_nop_();

sclk=1;

_nop_();

_nop_();

_nop_();

}

_nop_();

_nop_();

_nop_();

}

void play_isd4002(unsigned int addr)

{

unsigned char addr_l,addr_h;

addr_l=addr;

addr_h=addr>>8;

addr_h=addr_h|0xe0;

ss=0;

spi_mosi(0x20);

ss=1;

delay_ms(50);

ss=0;

spi_mosi(addr_l);

spi_mosi(addr_h);

ss=1;

delay_ms(10);

ss=0;

spi_mosi(0xf0);

ss=1;

}

void stop_isd4002()

{

ss=0;

spi_mosi(0x70);

ss=1;

delay_ms(50);

}

void main()

{

play_isd4002(0x86);

}

but i can't record the file... so I need a correct configuration for the ISD4002 ...thanks