View previous topic :: View next topic |
Author |
Message |
Skirmitt
Joined: 19 May 2009 Posts: 60
|
Max array size on pic 18f |
Posted: Fri Aug 14, 2009 7:01 am |
|
|
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
|
|
|
Ttelmah Guest
|
|
Posted: Fri Aug 14, 2009 8:51 am |
|
|
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
|
|
Posted: Fri Aug 14, 2009 9:13 am |
|
|
playing wave files ?
what sample rate ? 200 hz ? 8 bit ?
with THAT PIC ?
|
|
|
mkuang
Joined: 14 Dec 2007 Posts: 257
|
|
Posted: Fri Aug 14, 2009 9:18 am |
|
|
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. |
|
|
|