Welcome, Guest

Author Topic: PIC WEB C with flash memory AT45DB161D-SU  (Read 2407 times)

thanhquat

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
PIC WEB C with flash memory AT45DB161D-SU
« on: May 26, 2014, 01:26:09 PM »
i have PIC WEB C board
i replace flash memory from AT45DB011 to AT45DB161D-SU
i can't Uploading pages to the server
please help me

Stanimir5F

  • Jr. Member
  • **
  • Posts: 80
  • Karma: +2/-0
Re: PIC WEB C with flash memory AT45DB161D-SU
« Reply #1 on: May 26, 2014, 02:15:13 PM »
Hi Thanhquat!

The problem that you have may be caused by many different reasons. But when I checked the datasheet of the memory you are using I found that the code numbers of the operation are different. To illustrate you what I mean open the file "..\PIC-WEB 5.42 UEXT Full\Microchip\TCPIP Stack\SPIFlash.c" lines 909-929 you will see these macros defined:

Code: [Select]
/* Atmel opcodes*/
#define BUFFER_1_WRITE 0x84 // buffer 1 write
#define BUFFER_2_WRITE 0x87 // buffer 2 write
#define BUFFER_1_READ 0x54 // buffer 1 read
#define BUFFER_2_READ 0x56 // buffer 2 read
#define B1_TO_MM_PAGE_PROG_WITH_ERASE 0x83 // buffer 1 to main memory page program with built-in erase
#define B2_TO_MM_PAGE_PROG_WITH_ERASE 0x86 // buffer 2 to main memory page program with built-in erase
#define B1_TO_MM_PAGE_PROG_WITHOUT_ERASE 0x88 // buffer 1 to main memory page program without built-in erase
#define B2_TO_MM_PAGE_PROG_WITHOUT_ERASE 0x89 // buffer 2 to main memory page program without built-in erase
#define MM_PAGE_PROG_THROUGH_B1 0x82 // main memory page program through buffer 1
#define MM_PAGE_PROG_THROUGH_B2 0x85 // main memory page program through buffer 2
#define AUTO_PAGE_REWRITE_THROUGH_B1 0x58 // auto page rewrite through buffer 1
#define AUTO_PAGE_REWRITE_THROUGH_B2 0x59 // auto page rewrite through buffer 2
#define MM_PAGE_TO_B1_COMP 0x60 // main memory page compare to buffer 1
#define MM_PAGE_TO_B2_COMP 0x61 // main memory page compare to buffer 2
#define MM_PAGE_TO_B1_XFER 0x53 // main memory page to buffer 1 transfer
#define MM_PAGE_TO_B2_XFER 0x55 // main memory page to buffer 2 transfer
#define READ_STATUS_REGISTER 0xD7 // read status register
#define CONTINUOUS_ARRAY_READ 0xE8 // continuous read
#define MAIN_MEMORY_PAGE_READ 0x52 // main page read
#define PAGE_ERASE 0x81 // page erase

These are the operations which are used in the program in order to communicate with the atmel memory.
But for the memory you are using some of these values are different. Check its datasheet, chapter 15, page 28. For instance:
BUFFER 1 READ command - in AT45DB011 the code is 0x54 and for AT45DB161D-SU is 0xD4;
Main Memory Page Read - 0x52, instead of 0xD2
etc.
Maybe not all of the commands have different values but for the ones who are - you must set the values of AT45DB161D-SU.

Of course there might be another problem(s) but this one is for sure.

Still I suggest you not to replace it unless it's absolutely necessary. But in this case it's your responsibility and Olimex provides no support.

Stanimir, Olimex
May the Source be with You!

thanhquat

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: PIC WEB C with flash memory AT45DB161D-SU
« Reply #2 on: May 27, 2014, 05:59:10 AM »
Thanks Stanimir5F

i uploading pages to the server (using mpfsupload via wed)=> OK
MPFS Update Successful
Site main page


but i press Site main page[/b]
display:
404: File not found
Use MPFS Upload to program web pages


what happen