Page 1 of 1

Write read time to PIC18 EEPROM

Posted: Tue Jul 19, 2022 12:12 pm
by canary_wharfe
When doing a write/read to from the onboard eeprom there is a spec time for the operation to finish. On most PICS the max time to write to the eeprom is 8ms, typical is 5ms. Anyone know if the flowcode eeprom read write macros include the relevant delays internally in code or do I need to add them in to my program flow? Microchip recommends a while 1 loop while the write is operating and as soon as the write is finished the program exits the loop. Just wondering how I should be handling this situation in my code? Hoping it's all taken care of within the macro?

Re: Write read time to PIC18 EEPROM

Posted: Wed Jul 20, 2022 1:19 pm
by BenR
Hello,

We do the delay for you by monitoring the WR bit of the NVMCON1/EECON1 register to wait while the EE is busy. In your program you can have back to back EE writes without any problems.

Re: Write read time to PIC18 EEPROM

Posted: Wed Jul 20, 2022 6:11 pm
by canary_wharfe
That's brilliant Ben. Just what I was hoping for i.e. Flowcode makes the whole design cycle so much quicker