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

writing to eeprom and interrupts ...

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



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

writing to eeprom and interrupts ...
PostPosted: Tue Dec 07, 2010 7:52 pm     Reply with quote

After much snooping, I have a question on writing to eeprom and interrupts. In his examples, Ttelmah shows disabling the interrupts before the actual write then re-enabling (if they were enabled to start with) them again after the write operation has completed. However, in reading in the CCS compiler manual for version 4 (pg 99), it talks about the
#device WRITE_EEPROM=NOINT
and says "Allows interrupts to occur while the write_eeprom() ..." which implies to me that they are already disabling interrupts in the write routine. Anybody have any experience on this or am I missing something ? (yes, I did see in another post about the recommendation to disable interrupts during writes and the reasoning for it). Is it still necessary for me to disable them during my write routine or is CCS handling that for us now ?

thanks !
mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
Ttelmah



Joined: 11 Mar 2010
Posts: 19366

View user's profile Send private message

PostPosted: Wed Dec 08, 2010 2:54 am     Reply with quote

The option, postdates my code (by a lot - that write/read routine, was originally coded with an early V3 compile).
There are lots of CCS options like this, that have slowly been added to make things work right. It is up to you, whether you prefer to use their stuff, or ensure things are coded the way you want, with stuff you can see....

Best Wishes
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Wed Dec 08, 2010 7:07 am     Reply with quote

OK, thanks Ttelmah - I was just trying to figure out if we were dealing with the "department of redundancy department" or if it had evolved with the current code(back in version 2.x that I originally had, you did it all yourself).

What do you use these days with the current compiler version for your eeprom writes ? (I understand the concern for what goes on behind the curtain) Rolling Eyes

mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
Ttelmah



Joined: 11 Mar 2010
Posts: 19366

View user's profile Send private message

PostPosted: Wed Dec 08, 2010 7:46 am     Reply with quote

I use what I posted. I trust CCS to do this as little as I trust some businessmen....

Best Wishes
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Wed Dec 08, 2010 11:19 am     Reply with quote

Ttelmah wrote:
I use what I posted. I trust CCS to do this as little as I trust some businessmen....


Hahah... Yea...

It's like I've said before...

You can shortcut using the wonderful CCS pre-built functions.

If they don't work... then you end up writing it yourself... like C18.

;)
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Wed Dec 08, 2010 11:22 am     Reply with quote

OK, thanks folks - I will use Ttelmah's examples and not worry about the "man behind the curtain" in this case (contrary to what my wife says, I can be trained ! )

mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
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