EEROM problems in 16F877A


Results 1 to 4 of 4

Threaded View

  1. #1

    Default EEROM problems in 16F877A

    I have a system with a 12 way rotary switch. The switch position is read by the ADC and the result converted to a number 0 to 11. That switch position then generates an index to an array of 12 entries, each of 18 bytes, stored in the EEROM. The array first byte is "Valu" and the second byte is "Scale". The next 16 characters are a message to be displayed to the user for that switch position. The user can increment or decrement "Valu" and when he presses ENTER the new number for "Valu" is written to the EEROM.

    I should be able to write a total of 18 characters including the 16 character message to every one of the twelve array locations but I get EEROM collision error messages for all the values where index/2 is an odd number. In these locations, I can only write a total of 17 characters to these locations.

    When I run the program and display the 18 characters stored at each array location, every instance of Valu and of Scale are correct. The message strings however are only correct if index/2 is even. For all where index/2 is odd, the message starts with a different (stray) character.

    Has anyone seen this before? Is there a problem in PBP 2.47? I seem to recall an upgrade/patch to PBP a few revisions ago to allow EEROM writing to odd locations. I have checked the Melabs site but can't find anything related to PBP 2.47.

    The code is attached.

    Cheers
    Brian
    Attached Files Attached Files
    Last edited by BrianT; - 30th April 2007 at 06:56. Reason: sense

Similar Threads

  1. Serial VB 2005 pic 16f877a problems
    By Snap in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 8th July 2013, 00:52
  2. 16F877 vs. 16F877A
    By DavyJones in forum General
    Replies: 12
    Last Post: - 11th April 2009, 18:22
  3. Clock connection to DS1802 from 16F877A
    By coyotegd in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd January 2006, 18:52
  4. 16F877A stack problems
    By rocketman in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st October 2004, 16:54
  5. Problems with 16F877A code
    By NightHawk2 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th August 2003, 01:36

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