Eeprom 16f877?


Closed Thread
Results 1 to 4 of 4

Thread: Eeprom 16f877?

  1. #1

    Smile Eeprom 16f877?

    Hello to all,

    As I can store and read:

    M1 VAR BYTE
    M2 VAR BYTE
    M3 VAR BYTE
    M4 VAR BYTE

    in eeprom of 16f877?

    Thanks

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Leonardo

    Look in the PICBasic manual for DATA, READ and WRITE instructions.

    DATA - presets an EEPROM location at Program time (if you have PBC rather than PBP, then you don't have DATA and this is the EEPROM command instead)
    READ - Reads a BYTE from EEPROM
    WRITE - Writes a BYTE to EEPROM

    It's very simple... go try it...

  3. #3


    Did you find this post helpful? Yes | No

    Smile

    Mellanie Thanks

    Then ?



    M1 VAR BYTE
    DATA @ 0,0
    .
    .
    READ 0, M1
    .
    .
    WRITE 0, M1


    M2 VAR BYTE
    DATA @ 1,0
    .
    .
    READ 1,M2
    .
    .
    WRITE 1,M2


    M3 VAR BYTE
    DATA @ 2,0
    .
    .
    READ 2,M3
    .
    .
    WRITE 2.M3


    M4 VAR BYTE
    DATA @ 3.M4
    .
    .
    .
    READ 3,M4
    .
    .
    .
    WRITE 3,M4

    Thanks
    Last edited by Leonardo; - 4th October 2005 at 21:18.

  4. #4
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Post

    Leonardo -
    Use the Data command to write your value to EEProm when the chip is initially programmed (use for a static value or to preload the EEprom).... OR.... you can use the Read & Write commands to read or write data during program execution "Runtime" (like if the variable changes). Look at Section 5.11 for the Data command, 5.64 for the Read command, and 5.86 for the Write command.

Similar Threads

  1. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 14:46
  2. How to define constants that specify eeprom addresses
    By DwayneR in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 8th December 2009, 04:07
  3. Problem with I2C EEPROM addressing
    By Atom058 in forum General
    Replies: 14
    Last Post: - 3rd November 2009, 03:17
  4. How to write/read strings EEPROM/LCD
    By g-hoot in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 11th February 2007, 06:26
  5. word variable to 25lc640
    By TONIGALEA in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th July 2004, 19:59

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