Shop OBEX P1 Docs P2 Docs Learn Events
AT45 Intermitent problems — Parallax Forums

AT45 Intermitent problems

EricABergEricABerg Posts: 2
edited 2005-05-26 14:53 in BASIC Stamp
I am running a 28 PIN AT45 flash chip with 8Meg of bits with a BS2P40. I send data to the buffer and then from the buffer to the page. Everything generally works fine except every now and then when I read the data from the AT45 I get a bunch of 255s where there should be other data. I discovered that the buffer wasn't receiving the data correctly. The problem seems to be in the shiftout of data to the buffer. Has anyone out there had this experience before and if so how did you correct it?

Kind Regards,
Eric
·

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-05-26 02:00
    Eric,

    ·· Sid (Newzed) has used the AT45 in the past.· Perhaps he can post some of his example code and you can compare notes or something.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • NewzedNewzed Posts: 2,503
    edited 2005-05-26 11:55
    The only problem I have had with the AT45 was too little capacitance on the 3 volt power supply.· I use a minimum of 22uf on the Vin side of the regulator and that seems to have solved my problem.

    Here is a snippet of code I use to write to the buffer:

    LOW CS
    SHIFTOUT Dout,Sclk,MSBFIRST,[noparse][[/noparse]Buffer_1_Write\8, dummy\15, ByAddr\9]················· 'Buffer_1_Write con $84
    SHIFTOUT Dout,Sclk,MSBFIRST,[noparse][[/noparse]v1.lowbyte,v1.highbyte,v2.lowbyte,v2.highbyte]
    HIGH CS

    Did you read the buffer to make sure the buffer is receiving the data?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Need a bezel for your LCD?

    Newzed@aol.com
    ·
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2005-05-26 14:53
    It sounds like you have established that the problem is _not_ in writing data flash page, but in transferring the data to the buffer. So, you write to the RAM buffer and then immediately read back from the same RAM buffer, and it is bad? Maybe it is a program bug, mis-setting AUXIO vs MAINIO? If you are switching the power on to the AT45, does it have enough time to settle before you start the transfer?

    The problem Sid mentioned with the capacitor and power supply affects the write to the flash page, because of peak current at that instant. That is certainly the first place to look if you see bad data when you read back the flash page.


    EricABerg said...
    I am running a 28 PIN AT45 flash chip with 8Meg of bits with a BS2P40. I send data to the buffer and then from the buffer to the page. Everything generally works fine except every now and then when I read the data from the AT45 I get a bunch of 255s where there should be other data. I discovered that the buffer wasn't receiving the data correctly. The problem seems to be in the shiftout of data to the buffer. Has anyone out there had this experience before and if so how did you correct it?


    Kind Regards,

    Eric
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.