16f84a + 24lc16b Eeprom


Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Feb 2006
    Location
    Australia, Gold Coast
    Posts
    31

    Smile 16f84a + 24lc16b Eeprom

    Hello there!

    I am using a 16F84A @ 4Mhz XT with a 24LC16B, 4.7K Res. on SDA, SCL.
    All A0 A1 A2 to GND, WP is on GND

    My aim is to write Variable Bytes into the 24LC16B and then have the ability to retrieve them from random locations within the EEPROM.

    Being a beginner with EEPROMS, I have used the examples given by Les Johnson 'Experimenting with PICBasicPro' then I have modified the code, but with little results. If anyone has any tips or pointers, it would be much appreciated.

    I have read and re-read and studied the wretched data sheets for the 24LC16B, the diagrams showing it requires these to Write: 'Control Byte' + 'Word Address' + 'Data'

    That all makes sense, however when I change the 'Word Address' to 'Byte Address', it starts working with the first 10 locations on the eeprom and any subsequent writes from 11 and on are not OK neither can I read them back correctly... or am I just illiterate with the data sheets????

    I can read back "Hello World" only.

    I've attached the TXT file with the Code.

    I understand that to do random read it has to do a 'Control Byte' Write and then do a 'Control Byte' Read, this is so the internal address pointer is in the right direction, - but using the i2c commands, is this feasible?
    Would you do a i2cwrite with a blank variable then switch to a i2cread??

    If anything is unclear, let me know, so I can try and explain it better.
    Cheers

    From the Land down under

    AP
    Attached Files Attached Files

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. Problem with I2C EEPROM addressing
    By Atom058 in forum General
    Replies: 14
    Last Post: - 3rd November 2009, 03:17
  3. 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
  4. Need Help Plz. on chip Eeprom 16F84A
    By cesarman in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th January 2006, 00:53
  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 : 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