We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
There are absolute memory macros to access memory addresses in 8051, do we have any such to access externally connected flash through 8051?
I tried using C pointers, it does not seem to be reading the address in flash, How do we read & write from a memory location? Please help.
Thank you, going through them,
Wonder why, if 8 bit CMDs can be sent fine, Status register can be written to and read from, why reading from an address (or writing to) cannot be done using the same functions, they are sent as same 8 bits, what is the difference,
"Wonder why, if 8 bit CMDs can be sent fine, Status register can be written to and read from, why reading from an address (or writing to) cannot be done using the same functions, they are sent as same 8 bits, what is the difference,"
That made absoultely no sense at all in the context of this thread!
Then I remembered your other thread: http://www.keil.com/forum/docs/thread8478.asp
You're talking about your SPI-interfaced flash chip now, aren't you?
Remember - the SPI interface means that your flash chip does not appear in any 8051 address space!
Ya, very same flash , and talking about address locations and those operations in flash,
i mean, ya 8051 and flash chip to be interfaced, and flash chip is SPI compatible, have been asking about the same thing from the beginning, I didnt understand,
serial and parallel, one is an I/O device, the other is memory.
If you want to make orange marmelade, do you use apples?
Actually, if I recall correctly, there is (I do not know where, it is not something I would usee) a means of using a mutilated data banking routine that will make serial DATA memory APPEAR as if it was parallel. This, of course will make your program slow down to a crawl, but if you can live eith that, fine. Now, if you have a gaze at the above links, you will realize that, unless you have the CODE memory split in read only and read/write there will be no way of doing 'serial CODE memory' That solution would be so totally silly that I am certain some 'inventor' has something "tested" that will do just that.
As a final note: why are you fooling around with this? you can get large PARALLEL Flash for pennies e.g. 2Mbyte for #2.83 in reasonable quantities.
Erik
"talking about address locations and those operations in flash"
The flash is not connected to the 8051's address bus; therefore the addresses within the flash have absolutely nothing whatsoever to do with any addresses within any of the 8051's address spaces!
"I didnt understand"
Do you understand now?
Sir, " mutilated data banking routine that will make serial DATA memory APPEAR as if it was parallel. "
" CODE memory split in read only and read/write "
Sir, wonder what this is, all we are doing is interfacing flash to 8051, this being serial flash, commands, addresses and data is sent via Serial In pin of flash. I did not use any banking routine or whatsoever,
Have been trying to interface 8051 with serial flash and supposed to do just that That is, read & write Flash to and from 8051, not using parallel flash ,
Probably i am not able to express but we are talking about the same thing,
we write a program in 8051 about accessing the flash. This is stored in 8051 memory. The addresses where data is to be read & written to in flash is sent through 8051 to flash.
Is it the same thing that you say or something else, am trying to understand sir, Pardon me, not to test your patience, please help me out,
we write a program in 8051 about accessing the flash. This is stored in 8051 memory. that datasheet for your device (READ it) will tell you what to 'feed' to the serial memory and what wilkl come back as a result.
You will need to write a "SPI driver" that process data between the flash and a buffer in RAM that hold the data you want to write and/or a buffer in RAM to hold the data you read.
how to process this operation will be described in the datasheet for the serial memory.
"we write a program in 8051 about accessing the flash. This is stored in 8051 memory."
Your program is stored in the 8051's CODE address space.
Your external SST25VF512 Flash chip is connected via SPI; it does not appear in any 8051 address space
"The addresses where data is to be read & written to in flash is sent through 8051 to flash."
These addresses refer to locations within the external SST25VF512 Flash chip; they are sent from the 8051 to the external chip via the SPI.
Thanks eric, Could you also give me some tips on how to for the SPI driver, Thank you,
Right O boss,
"they are sent from the 8051 to the external chip via the SPI."
Could you tell how to send the same via thew SPI, is it a different procedure or an extension of the flash program,
Thanks,
"Could you tell how to send the same via thew SPI"
You already have a separate Thread on that subject. Please stick to the subject of the Thread!
"is it a different procedure or an extension of the flash program"
SPI is just an interface; you have to write a program to use it - just like you have to write a program to send & receive characters via the UART.
Your program is stored in the CODE memory space of the 8051.
" SPI is just an interface; you have to write a program to use it "
Could you give some tips as to how to write the same, Will this program be different from the one used to access the flash?
SPI is a standard interface - so start by looking for the specifications.
You may well find sufficient detail in the SST25VF512 datasheet.
Use your favourite internet search engine - there is loads of information already out there!
There are even examples here: http://www.keil.com/download/list/c51.htm
Once you have worked-out the basics of how to transfer bytes across the interface, then you have to think about what you need to do with those bytes - that is specified in the datasheets for whatever SPI device(s) you are using.
Again, it's just like using the UART - first you need the basics of how to send & receive a character, then you need to form those characters into whatever commands, responses, etc are required by your application...