Write read time to PIC18 EEPROM
-
- Posts: 78
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 10, 2020 3:54 pm
- Has thanked: 6 times
- Been thanked: 11 times
Write read time to PIC18 EEPROM
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?
-
- Matrix Staff
- Posts: 1726
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 438 times
- Been thanked: 602 times
Re: Write read time to PIC18 EEPROM
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 78
- Joined: Thu Dec 10, 2020 3:54 pm
- Has thanked: 6 times
- Been thanked: 11 times
Re: Write read time to PIC18 EEPROM
That's brilliant Ben. Just what I was hoping for i.e. Flowcode makes the whole design cycle so much quicker