CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

ISD4002

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Carlos_Ml



Joined: 07 Aug 2004
Posts: 1
Location: Costa Rica

View user's profile Send private message Visit poster's website

ISD4002
PostPosted: Sat Aug 07, 2004 12:49 pm     Reply with quote

Hi all,

I'm having problems using aN ISD4002 Chipcorder with a 16F877. The Spi_write command doesn't seem to do anything. I'm using version 3.
Any codes to help out would be aprpreciated. Thanks

Carlos
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Aug 08, 2004 12:30 pm     Reply with quote

If you have the CCS compiler, look at the ISD4003.C file in this folder:
c:\Program Files\Picc\Drivers
It's a similar chip to the ISD4002.
Guest








PostPosted: Mon Aug 09, 2004 8:16 am     Reply with quote

Thanks man. My problem thus far is that the SPI_WRITE command doesn't seem to work. The SCLK and MOSI pin never change.
Any ideas?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Aug 09, 2004 1:30 pm     Reply with quote

Quote:
My problem thus far is that the SPI_WRITE command doesn't seem to work.

The CCS driver file, isd4003.c, uses software SPI so that means you're
not using the CCS driver.

OK. So the next thing you should do is write a test program to
prove that the CCS spi_write() function works. See the demo
program below. This program will put out groups of 8 positive-going
pulses on the SCK pin of the PIC, with 100 usec between the groups.
On the SDO pin, you will see 4 negative-going pulses. (This is the
data byte, 0x55). Run this program on your demo board and see
if you can get these pulses. (Modify the #include and the #fuses
statements as needed, to make it work with your demo board).

Code:
#include <16F877.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock = 4000000)
#use rs232(baud = 9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)

void main()
{
printf("Start\n\r");

setup_spi(SPI_MASTER | SPI_L_TO_H | SPI_CLK_DIV_16);

while(1)
  {
   spi_write(0x55);
   delay_us(100);
  }

}
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group