View previous topic :: View next topic |
Author |
Message |
newguy
Joined: 24 Jun 2004 Posts: 1907
|
When does write_eeprom() return? [SOLVED] |
Posted: Thu Oct 26, 2017 2:50 pm |
|
|
Stupid question, but compiler's help reference is a little unclear to me. Does the write_eeprom() function return immediately, which means that the actual (slow) write to the PIC's internal EEPROM will complete at some point in the future, or does write_eeprom() block until the write has completed (several ms later)?
Last edited by newguy on Thu Oct 26, 2017 3:16 pm; edited 1 time in total |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Thu Oct 26, 2017 3:00 pm |
|
|
Easiest way to figure out is cut a small program,compile and dump the listing.... |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1907
|
|
Posted: Thu Oct 26, 2017 3:17 pm |
|
|
You're right - that was easy.
For anyone curious, it blocks until the write is complete. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Thu Oct 26, 2017 4:05 pm |
|
|
That would be my 'assumption' but after 'assuming' my forklift wouldn't get stuck in 2 inches of mud and that the distributor cap of my tractor was fine.....I'm DONE with assuming things.....after 6 hrs of blood, sweat and tears I'm only left with a silly PC using W7 that doesn't wakep to wiggling mouse...I should have stayed with XP...
Some days it doesn't pay to get out of bed....
Glad you took the time and SAW what was going on....first hand knowledge is powerful.
Jay |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19496
|
|
Posted: Fri Oct 27, 2017 12:43 pm |
|
|
#device WRITE_EEPROM=ASYNC
Will set it to not wait. Instead it'll test at the start of the write that the EEPROM is not busy writing.
By default it waits to complete as you have found. |
|
|
|