Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/24/08 20:16
Read: times


 
#152497 - Another look...
Responding to: ???'s previous message
I just took another look at this and it seems the clearing of the flag shouldn't be an issue because when the EAD8 bit in DEECON is set it writes 0's to all the other bits. So whenever the write or read function is called these bits are cleared automatically. That being said, I don't know quite why they have declared a variable to show the state of EEPROM access. The EEIF bit in DEECON already provides this and if it was cleared by software meeprombusy shouldn't be needed.

Also, there should be no reason to call eeprom_isr as you are doing. This function will be called when a write/read is completed. The isr does not work properly for a EEPROM read so make sure you disable either EA or EEIE before doing a EEPROM read.

Take note that the EEPROM ISR shares an interrupt vector with the ADC interrupt. If the ADC is enabled and using interrupts this will be a problem and will have to be dealt with by checking to see which source caused the interrupt.

List of 14 messages in thread
TopicAuthorDate
EEprom sequence.....            01/01/70 00:00      
   have you tried ...            01/01/70 00:00      
      Code was generated by code arch......            01/01/70 00:00      
   definitely not            01/01/70 00:00      
   OOOPS, I goofed            01/01/70 00:00      
   A few issues            01/01/70 00:00      
   Another look...            01/01/70 00:00      
      This block of code works as it should            01/01/70 00:00      
         already answered            01/01/70 00:00      
            LOL.....ok np.....now an internal save issue            01/01/70 00:00      
               local variables are unknown            01/01/70 00:00      
               Switching on wrong variable            01/01/70 00:00      
                  Brett your right......left over var            01/01/70 00:00      
         Should work            01/01/70 00:00      

Back to Subject List