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 support@ccsinfo.com

Max array size on pic 18f

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



Joined: 19 May 2009
Posts: 60

View user's profile Send private message

Max array size on pic 18f
PostPosted: Fri Aug 14, 2009 7:01 am     Reply with quote

Hi,

I'm currently doing a project that plays wave files. I have one set that works perfect and others that don't work. Is there a limit in array size ? Sometimes it happens that I compile a program and the compiler gets stuck in the compiling window (crash).

Code:

#include <18F2685.h>
#fuses INTRC_IO, NOWDT, NOPROTECT, BROWNOUT, PUT, MCLR
#use delay(clock = 8000000)
#use rs232 (baud=9600, xmit=PIN_C6, rcv=PIN_C7)

#include "stop11.h"
#include "start11.h"
#include "idle11.h"
#include "idlepss.h"

#define START_LENGTH 21042
#define STOP_LENGTH 29716
#define IDLE_LENGTH 15549
#define IDLEPSS_LENGTH 15557


This code works. But I don't know where the limit is as the compiler doesn't notify me.
mkuang



Joined: 14 Dec 2007
Posts: 257

View user's profile Send private message Send e-mail

PostPosted: Fri Aug 14, 2009 8:49 am     Reply with quote

You might consider looking here"

http://www.ccsinfo.com/forum/viewtopic.php?t=5598&highlight=maximum+array+size
Ttelmah
Guest







PostPosted: Fri Aug 14, 2009 8:51 am     Reply with quote

How are we meant to know what your program does wth the declarations you show?....

Of course the chip has array limits. Depends what other variables you have declared, and the orders these are declared. Remember though just 3328 bytes of RAM.....

Best Wishes
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Fri Aug 14, 2009 9:13 am     Reply with quote

playing wave files ?

Laughing Idea

what sample rate ? 200 hz ? 8 bit ?

with THAT PIC ?

Laughing
mkuang



Joined: 14 Dec 2007
Posts: 257

View user's profile Send private message Send e-mail

PostPosted: Fri Aug 14, 2009 9:18 am     Reply with quote

Oh come on? THAT pic is one of the "higher" end pics in the 18 series. I used it once when my 2525 ran out of ROM and I had to find a pin for pin compatible replacement. If you are trying to play WAV files I don't think any PIC will do the trick.
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