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

compiling code to SPI ROM

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



Joined: 03 Dec 2005
Posts: 182
Location: Australia SA

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

compiling code to SPI ROM
PostPosted: Thu Nov 22, 2007 2:59 pm     Reply with quote

I dont know if it can be done I want to when compiling a program to the micro, I want to send data to the SPI ROM not to be part of the running program, to be used as a menu data for my RS232 VT100 emulator.

I am using to 24FJ64GA004 QFN micro, it looks like I may run out of ROM space and this is the largest QFN size I can use Confused
_________________
What has been learnt if you make the same mistake? Wink
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Nov 23, 2007 1:25 pm     Reply with quote

You can't program an SPI memory chip at compile-time.
You can do this:

1. Write a PIC program which will program the SPI memory with
your LCD data. The only purpose of this PIC program is to load
the SPI chip with the LCD data.

2. Run the program. This will write the LCD data to the SPI chip.

3. Now re-program your PIC with your real application program.
Storic



Joined: 03 Dec 2005
Posts: 182
Location: Australia SA

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

PostPosted: Fri Nov 23, 2007 7:22 pm     Reply with quote

Thanks,
will do this as suggested Wink
_________________
What has been learnt if you make the same mistake? Wink
Rohit de Sa



Joined: 09 Nov 2007
Posts: 282
Location: India

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

PostPosted: Sat Nov 24, 2007 8:00 pm     Reply with quote

Hey,

Another solution would be to directly store your data to the SPI memory in hex. You would need a programmer for that. I use the PICKit2. For example, if I have long strings of data to output to an RS232 terminal, instead of wasting ROM space on the PIC, I put strings onto the memory chip, and tell the PIC to request string data from the chip. It saves a load of PIC ROM space. Your strings could either be null terminated (in which case the PIC would have to check for a '0x00' character), or you could store the location of the start of multiple strings in PIC memory and call upon the string when you need. Eg:
<location 0x00>: (String 0)
<location 0x15>: (String 1)
<location 0x59>: (String 2)
.
.
.
.

And my function would be:

{
.
.
display(String_0)
.
.
}


where String_0 = 0x00

Cheers,
Rohit.
Storic



Joined: 03 Dec 2005
Posts: 182
Location: Australia SA

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

PostPosted: Sat Nov 24, 2007 10:46 pm     Reply with quote

Thanks,
I thought of another possible way (maybe). Confused

write the code as normal with a setup procedure to load data from a text file (or hex) on the PC via the RS232 port to fill the SPI ROM with the necessary data required. This way should I want to change the menu data, I just send another TEXT/HEX file from the PC into the SPI ROM. Wink
_________________
What has been learnt if you make the same mistake? Wink
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