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

need help for dspic 30f6010A data eeprom

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



Joined: 26 Nov 2009
Posts: 19

View user's profile Send private message

need help for dspic 30f6010A data eeprom
PostPosted: Tue Dec 01, 2009 8:34 am     Reply with quote

I'm using ide ver 4.068. I'm new for dspic.
Anyone help for writing data eeprom and reading data eeprom.

I'm using function value= read_eeprom(address)
and write_eeprom(address, value)

But it does not work.
Anyone has a code for this?

thank
mkuang



Joined: 14 Dec 2007
Posts: 257

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

Re: need help for dspic 30f6010A data eeprom
PostPosted: Tue Dec 01, 2009 11:00 am     Reply with quote

dnatechnical wrote:
I'm using ide ver 4.068. I'm new for dspic.
Anyone help for writing data eeprom and reading data eeprom.

I'm using function value= read_eeprom(address)
and write_eeprom(address, value)

But it does not work.
Anyone has a code for this?

thank

How about some compilable code, otherwise it could be anything.
dnatechnical



Joined: 26 Nov 2009
Posts: 19

View user's profile Send private message

PostPosted: Tue Dec 01, 2009 12:23 pm     Reply with quote

if you have any code please send me
mkuang



Joined: 14 Dec 2007
Posts: 257

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

PostPosted: Tue Dec 01, 2009 12:26 pm     Reply with quote

I don't have any code. But you said something doesn't work, which implies you have written a program, try to compile it, and either get a compiler error or when burnt into your PIC the program doesn't work as you intended.
dnatechnical



Joined: 26 Nov 2009
Posts: 19

View user's profile Send private message

PostPosted: Tue Dec 01, 2009 10:50 pm     Reply with quote

There is no error for compile.
But when I simulate it eeprom doesn't change data.
dnatechnical



Joined: 26 Nov 2009
Posts: 19

View user's profile Send private message

PostPosted: Thu Dec 03, 2009 12:49 am     Reply with quote

write _eeprom (address, value );

where address is 16bit data

dspic 30f6010 data eeprom start from 0x007ff000 , it 24 or 32 bit
now which instruction is suitable for this device.

anyone can help?

thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Dec 03, 2009 4:12 pm     Reply with quote

Download the PCD compiler manual.
http://www.ccsinfo.com/downloads/PCDReferenceManual.pdf
Look in this section on page 291 (page 303 in the Acrobat reader):
Quote:
write_eeprom( )


The manual says:
Quote:

write_eeprom (address, value)

Address is the 0 based starting location of the EEPROM write

Note that you don't put in the physical address of the eeprom.
Just put in a relative address that starts at 0. For example, if you
have 1024 bytes of eeprom in the PIC, then you can use addresses
0 to 1023 (0 to 0x3FF in hex).
dnatechnical



Joined: 26 Nov 2009
Posts: 19

View user's profile Send private message

PostPosted: Fri Dec 04, 2009 1:20 am     Reply with quote

Thank you.
Its working now.
Its my fault to understand it.
Thank you Very Happy
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