How to read & write to a 25aa1024 (1 Mbit SPI Bus Serial EEPROM) via 16F88


Closed Thread
Results 1 to 37 of 37

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530

    Default

    Sorry, read the data sheet wrong. Nevermind
    Last edited by ScaleRobotics; - 17th April 2010 at 06:50.

  2. #2
    Join Date
    Mar 2010
    Location
    Minnesota, USA
    Posts
    41

    Default

    Whoops it dawned on me what I am doing by changing that Bit. I guess that my novice understanding of this made me stumble upon the fact that I am now writing and reading from a different Chip Select, but seeing how I only have the one chip I dont understand how its reading/writing chip 01 when it should be chip 00.

    So I guess where I was calling it the A2 bit its actually the A0 bit that I was changing.

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    How do you have pins A0 and A1 connected?

    I have not had a chance to work on this today yet so I do not have any new news.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Mar 2010
    Location
    Minnesota, USA
    Posts
    41

    Default

    Quote Originally Posted by mackrackit View Post
    How do you have pins A0 and A1 connected?

    I have not had a chance to work on this today yet so I do not have any new news.

    Tied to ground.

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

    Default This one is for Dave...

    mackrackit, You can't use Shiftout and Shiftin for an I2C bus driven part. That is why you had no luck using it with a 24FC1025... It requires the pullup resistor for communicating the ACK signal back to the processor. Shiftout keeps the pin in an active state wghich ever it is... I recently posted code for talking to 24LC1025's here on the forum... Why not just use it for a starting point... I don't remember which thread it was in reply to but I believe it had to do with I2C....

    Dave Purola,
    N8NTA

  6. #6
    Join Date
    Mar 2010
    Location
    Minnesota, USA
    Posts
    41

    Default

    Dave,

    I've searched through all the posts on the 24LC1025 and didn't find any code you posted but I found code that is basically the same as what I have tried already. If you can find the thread you were thinking of that would be great.

    The only thing I have not tried is changing is my pullups from 4.7k to 2k and trying to write to it 1 page at a time but if I cant byte-write to begin with I'm sure the page write will not work either. I will try changing the Pullups tonight and see what happens.

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    I got the idea for shifting here.
    http://www.rentron.com/PicBasic/i2c_communication.htm

    Reading back over my code and data sheet I see some things are backwards. Maybe ...

    Never did find that code posting. Found lots of others for different parts.
    Dave
    Always wear safety glasses while programming.

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