Memory Loss??


Closed Thread
Results 1 to 5 of 5

Thread: Memory Loss??

  1. #1
    Join Date
    Feb 2005
    Location
    Holmfirth England
    Posts
    116

    Default Memory Loss??

    Hi,

    I am using a pic to control the current produced by a welding machine. I measure the current using analog input, then do some maths and send a value to a DAC to adjust the phase angle. After a weld I save the value to the internal memory, so that when welding again this value can be read, to give a good starting point for the weld.


    Ok this is the problem. A machine was left for a couple of weeks, and when it came to be used again the current was on full (about 3000A making a nice big hole in the welding bench) It was as if the value saved to memory had been corrupted or set to zero. (the lower the value the higher the current) I reprogrammed the pic and all worked fine, so I dont think a hardware fault was to blame. I was just wondering if anyone has had problems with the internal pic memory?

    Best regards
    Bob...

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I initially had lots of problems with EEPROM until I made a few code changes. Since then, I have had values hold for 3 years. My changes are:

    Always issue a delay between successive WRITEs. I use 100uSec.
    Make certain that interrupts are disabled during WRITEs.

    I don't know if these have any relevance to your code.

    Charles Linquist
    Charles Linquist

  3. #3
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Charles Linquis
    ...

    Always issue a delay between successive WRITEs. I use 100uSec....

    Hi Charles,

    I also made a rule myself to use some delay before each WRITE command until I read the post by Melaine that WRITE command already has its own delay for write operation. Thus, I no longer use any pause/delay before WRITE.

    Here is the post.
    http://www.picbasic.co.uk/forum/showthread.php?t=549

    -----------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  4. #4
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

    Default

    Are you exceeding the max writes specification? Are you saving too often that the eeprom is getting damaged? Ideally you should save just before power down.

    Jerson

  5. #5
    Join Date
    Feb 2005
    Location
    Holmfirth England
    Posts
    116


    Did you find this post helpful? Yes | No

    Smile

    Thanks for the response guys. I have found the problem, after all it was a fault with the hardware. A lose crimp terminal was intermittently giving only about a fith of the output from the current shunt, thus the feedback was ramping the current to full output, and thinking the output was only 1000 amps or so.

    Good to know there is no problem with the PIC

    Best regards
    Bob...

Similar Threads

  1. Strange pic 16f877a memory loss
    By DavyJones in forum General
    Replies: 23
    Last Post: - 6th July 2009, 20:27
  2. Need the code to write to a memory
    By Hamlet in forum General
    Replies: 0
    Last Post: - 20th August 2007, 00:22
  3. Replies: 4
    Last Post: - 2nd March 2007, 06:12
  4. sample code for M25P32
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th January 2007, 02:37
  5. Use internal program memory like DATA memory
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th December 2006, 18:38

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts