View Single Post
  #3   Spotlight this post!  
Unread 03-12-2004, 23:03
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Arrays on the PIC?

Quote:
Originally Posted by scitobor 617
Has anyone used arrays on the new controller? What are the limits on the number of values stored in an array? Anyway around using arrays if they are not allowed or are too limited because of ram size (such as EEPROM)?
As mentioned above arrays are supported.
If you use ram data space you are limited to 256 bytes of global variables (or static) declared within any one MPLAB file, e.g., "char a[256];". 120 bytes of variables within a single routine. This doesn't mean you can't break the array up into several smaller arrays. A total of 1,343 bytes of ram are available to the user after the IFI overhead.

An array of rom constants (those that use program space) can be larger, but can't be modified at run time.

EEPROM requires a read/write operation for each value you put in or take out.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 03-12-2004 at 23:14.