Go to Post No, I've never done 3D programming before, but I'm young and naive, so I still think I can do it. ;) - Ryan M. [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #14   Spotlight this post!  
Unread 16-09-2004, 19:29
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: Saving a variable in between runs.

Quote:
Originally Posted by Fat Alex
so... uh, where would i learn how to do that?
Unless you are writing a bootloader(program to allow the pic to program itself without a programmer), i can't really see why it would ever be a good idea to store anything to flash. The only advantage is that it is big... If you need to store alot of data, I would use an external EEPROM..

*Anything you write to flash will be erased if you upload a new program
*It is difficult to both read and write from
*It can cause VERY odd errors if you are not careful (you are writing to the same space as your program is executing from and if you overlap bad things will happen)
*you can only write blocks of 8 bytes at a time
*you can only erase in blocks of 64 bytes at a time
*Flash memory is only rated for 100,000 write/erase cycles. EEPROM is rated for 1,000,000

If you really have your heart set on it, the datasheet will tell you how.

Quote:
Originally Posted by Mark McLeod
2) "rom const int x=10;" uses ROM or program space. You cannot change the value of x from within your program as it's running (the compiler will reject "x=y+2;" as an error). The value at program load is permanent and unchanging, only by downloading a new program can x be modified.
you CAN write to ROM at runtime but its difficult and i wouldnt' advise it.
__________________
1139 Alumni

Last edited by Rickertsen2 : 16-09-2004 at 19:34.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MPLAB Variable Simulator? Chris_Elston Programming 3 18-02-2004 12:08
Interrupt Handlers and Variable Scope kaszeta Programming 2 14-02-2004 18:30
variable? manodrum Programming 11 01-04-2003 17:20
Dashboard programs and the char variable Ian W. Programming 13 26-06-2002 02:07
what teams have a variable transmissions? Greg Perkins Technical Discussion 4 06-03-2002 06:10


All times are GMT -5. The time now is 21:47.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi