Does the compiler disable Interrupts during read_eeprom()
Posted: Fri Nov 24, 2006 2:18 am
I have a 16f877 based project.I have two question:
1.Does the compiler disable Interrupts during read_eeprom() and write_eeprom()?
2. If not, Do I need to disable Interrupts when using read_eeprom() and write_eeprom() for data read/write safety?
Thanks in advance!
davekelly
Joined: 04 Oct 2006 Posts: 53 Location: Berkshire, England
Posted: Fri Nov 24, 2006 2:56 am
Interrupts are disabled for both read_eeprom() and write_eeprom() automatically.
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
Re: Does the compiler disable Interrupts during read_eeprom
Posted: Sat Nov 25, 2006 10:54 am
suncq wrote:
I have a 16f877 based project.I have two question:
1.Does the compiler disable Interrupts during read_eeprom() and write_eeprom()?
2. If not, Do I need to disable Interrupts when using read_eeprom() and write_eeprom() for data read/write safety?
Thanks in advance!
davekelly answered your direct question but as a followup, you can learn EXACTLY what the compiler is doing by looking at the resulting LST file. You can see the assembly code in all its glory (or gore?).
Learning to read and understand what the various assembly commands do as well as having the memory map for your particular PIC handy go a long way in figuring out what may on the surface seem to be a very mysterious problem.
You don't have to be proficient in PIC assembly language, just know enough to read it. _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
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