strange problems with 18F2520 and 18F2525


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2006
    Location
    USA
    Posts
    26

    Default strange problems with 18F2520 and 18F2525

    I just started having problems with these parts. The PBP "WRITE" command is
    not writing to the EEPROM. Also, the INT0 and INT1 flag bit doesn't seem to be
    setting, but I haven't had a chance to look into that yet. The EEPROM is my
    main concern right now as I have a new product out on the market that isn't
    storing settings in the EEPROM. Has anyone heard of this? I'm using PBP 2.46
    with the patch (2.46a) and brand new 18F2525-I/SO parts. Programming with
    EPIC.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    i heard the issue on the 2520, but i used several 2525 as now, and those, as far as i'm aware of, never get this kind of EEPROM problem.

    Can you post a snip of your program?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Brock
    ... The PBP "WRITE" command is
    not writing to the EEPROM. Also, the INT0 and INT1 flag bit doesn't seem to be setting...
    I would suggest finding the interrupt problem first.

    If a write to EEPROM gets Interrupted. It will fail. And, If you are having problems with the interrupts, it could be the cause.

    Things to try,
    1. Disable all interrupts and try to write to EEPROM.
    2. Disable Interrupts while writing to EEPROM.
    3. Write to EEPROM, read it back, and if it's different try again. If unsuccesfull after so many tries, Disable Interrupts and try again.
    4. Use EE_Vars.pbp, and let it do it all for you.
      http://www.picbasic.co.uk/forum/showthread.php?t=2444
    DT

  4. #4
    Join Date
    Jul 2006
    Location
    USA
    Posts
    26


    Did you find this post helpful? Yes | No

    Default

    All interupts are disabled, as always. I poll the interupt flag to look for a rising
    edge on the interupt ports. This program is not any different from other
    programs I have written, in regards to the WRITE command and the interupt
    flag polling. I am baffled. I even tried an older 18F2520 chip that I had laying
    around and the same thing is happening... a chip that didn't have this problem
    before!

    I use the EEPROM command to write initial contents to the EEPROM and there is
    no problem there. But writing to it during runtime does not work. I think
    something is happening with the compile, but nothing has changed on the
    computer that I use, so I can't imagine what the problem is. I have been using
    PBP for over 5 years and consider myself pretty good at writing programs, but
    this has me completely stumped!

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    This have to be a silicon batch problem. See the tons of errata on the Microchip website. But some use them and works a treat... it's certainely not even a PBP related problem.

    Hum humn.. i saw almost the same question/comments on some competitor product.. and they mostely comes up with the same conclusion.

    The Darrel suggestion could be a real great workaround... but i just hope it will never ends up in an endless loop... wich is... a real pain in the ...

    I'll try those i have here to see if i'm better lucky.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Jul 2006
    Location
    USA
    Posts
    26


    Did you find this post helpful? Yes | No

    Default

    OK, now I'm feeling kind of stupid... the flash program configuration also affects
    the EEPROM, not just the program memory. Configuring the target device to
    Enable Flash Programming allows the program to write to the program memory
    AND the EEPROM. I thought it was only for the program memory. It says right
    in the data sheet that EECON1.2 enables or disables writing to the Flash memory
    or the EEPROM.

    So, 1 problem solved and 1 to go.

Members who have read this thread : 0

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