Write read time to PIC18 EEPROM

Use this section to discuss your embedded Flowcode projects.
Post Reply
User avatar
canary_wharfe
Posts: 135
http://meble-kuchenne.info.pl
Joined: Thu Dec 10, 2020 3:54 pm
Has thanked: 15 times
Been thanked: 16 times

Write read time to PIC18 EEPROM

Post 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?
< The Flowcode 11 Pro Silicon Chipper >

BenR
Matrix Staff
Posts: 2211
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 607 times
Been thanked: 803 times

Re: Write read time to PIC18 EEPROM

Post 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.

User avatar
canary_wharfe
Posts: 135
Joined: Thu Dec 10, 2020 3:54 pm
Has thanked: 15 times
Been thanked: 16 times

Re: Write read time to PIC18 EEPROM

Post by canary_wharfe »

That's brilliant Ben. Just what I was hoping for i.e. Flowcode makes the whole design cycle so much quicker
< The Flowcode 11 Pro Silicon Chipper >

Post Reply