18F1320 ... Strange Memory


Closed Thread
Results 1 to 40 of 44

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Hi,Luciano

    I have 05250SE as a code.

    I bought them at the end of last year ( 2005 ) from FARNELL.

    I've seen the errata giving an increasing EEPROM Writing time from 4 to 5.5 ms ...

    may be, MPLAB didn't follow ...

    something strange is I have to program it in 4 times ( ! ) to get 100% success

    1) Erase all
    2) Config words only( Ok only at second pass ...)
    3) Program only
    4) EEPROM only

    setting to "Auto select" fails at each trail ... " Erase all at first" too

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

    Default

    Maybe MPASM don't follow or just consider the newer device... I'll not be surprise if so...

    Let's see what Melanie will discover with her brand new version.
    Steve

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

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Acetronics, Last year I worked on a project for almost 4 months trying to get an 18F1320 to operate @ 40 Mhz. and then @ 20 Mhz. with eratic results. After looking at the data sheet I decided to use the 16F88 and have never gone back to the 18F1320. The errata sheets tell all. I ordered parts from DigiKey and they said that they had the latest hardware on hand but after receiving 50 parts of an old revision I gave up ordering from them. I was on the MicroChip forum for about 2 months and found out that they wern't very stable as far as the PLL goes and very sensitive to power supply variations. Like I said after looking at the data sheets of the 2 I decided to go with the 16F88 and haven't looked back yet. LOL

    Dave Purola,
    N8NTA

  4. #4
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Alain,

    The oscillator speed of your PIC is 20MHz.

    Can you try to change "DEFINE OSC 20" in "DEFINE OSC 25" and flash
    the PIC running at 20 MHz with this code? If you try that you will
    probably increase the EEPROM writing time and see if ONE write is
    enough. This is just a test.

    Best regards,

    Luciano

    EDIT:
    Are you absolutely sure that the oscillator speed is correct?


    -
    Last edited by Luciano; - 7th April 2006 at 14:39.

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Unhappy

    Quote Originally Posted by Luciano
    Alain,

    The oscillator speed of your PIC is 20MHz.

    Can you try to change "DEFINE OSC 20" in "DEFINE OSC 25" and flash
    the PIC running at 20 MHz with this code? If you try that you will
    probably increase the EEPROM writing time and see if ONE write is
    enough. This is just a test.

    Best regards,

    Luciano

    EDIT:
    Are you absolutely sure that the oscillator speed is correct?


    -
    Hi,Luciano

    Sorry, but that won't give anything ... as the EEPROM writing time is controlled by the PIC Hardware ...

    For the Osc speed, it's correct : 1.52 ms input signals give ( 279 + 7H ) Hex.

    ( EEPROM addresses are: 01 high byte, 02 low byte, and 30 Offset )

    Thanks for the idea ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Alain,

    I understand that at completion of the write cycle, the WR
    bit is cleared in hardware and the EEPROM Interrupt Flag bit
    (EEIF) is set. The user may either enable this interrupt
    or poll the WR bit. There is also a third barbarous method which
    is just wait 10 ms.

    In your post you say that PbP uses the polling method. This
    should be ok if the microcontroller hardware has no bug.

    Can you put a "PAUSE 10" after each WRITE in your code?
    (10 ms pause).

    Best regards,

    Luciano

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Unhappy

    Sorry one more time, Luciano ... the problem only occurs with a single writing !!!

    a Pause won't change anything ... and won't change the EEPROM writing time.

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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 : 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