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

#rom

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



Joined: 07 Sep 2003
Posts: 60
Location: Buenos Aires (Argentina)

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

#rom
PostPosted: Fri Jul 28, 2006 6:46 am     Reply with quote

From CCs manual:

Quote:
#ROM

address is a ROM word address, list is a list of words separated by commas

Purpose:
Allows the insertion of data into the .HEX file.
In particular, this may be used to program the '84 data EEPROM, as shown in the following example.



What mean '84 ? 16f84 ?

It is possible a best way to this:

Quote:
#define V_TOTAL 0xF00020
// A address defined ponting to eeprom
#ROM V_TOTAL= { 0x0000, 0x0000}


#define V_TOTAL_DIR 0x00
// Another define pointing to the same eeprom address
int32 init_read_eeprom(void)
{
int32 temp32;
temp32 = read_int32_eeprom(V_TOTAL_DIR);
return temp32;
}

_________________
Best Regards
Daniel H. Sagarra
La Plata (Argentina)
Ttelmah
Guest







PostPosted: Fri Jul 28, 2006 3:00 pm     Reply with quote

Yes. The example is for the 16F84.
Your code has a problem with the addresses. The EEPROM is at location 0xF00000, in the 'program' map for the 18 chips. Your initial code puts the bytes at address F00020.Then tries to retrieve the bytes from address F00000...
V_TOTAL_DIR, needs to be 0x20, to access the same locations.

Best Wishes
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