i'm working in a project in which I'm exploiting IC of s1mp3 mp3 player, this kinfd of mp3 players has a SoC (System On Chip) called ATJ2085 which manage a NAND flash memory (a SAMSUNG k9f2G08U0M, it's not SD or MMC) through parallel links and use the FAT16 as a file system for it. in this project I have to share this memory with the PIC (18F4525) to write, read and display with an LCD -connected to the PIC-the content of the flash memory (songs, texts,etc....), and here I get a big problem cause all application notes and C programms for PIC that I did found in internet were made for SD, MMC cards or CF (Compact Flash) who communicate with the memory for R/W through the SPI bus !!!!
I'll be very grateful to anybody who will give me eany kind of advice, cause I'm turning around for days now without finding any solution.
I think you are SOL. The 18F4525 does not have an external memory interface so you will have to synthesize one using 8 port pins for a data bus and a couple of more pins for control signals. The ATJ2085 expects to be the bus master and I did not see any pins that would lead me to believe that it will stand for interference from another bus master when it wants to read or write data. That leaves you with the need to construct a robust, simultaneous access, dualport memory. There are not all that many designers on the planet who can pull this off. I hope you are one of them. Of course you could use an actual dualport chip but the size is likely to be way smaller than you might be comfortable with.
I think you are SOL. The 18F4525 does not have an external memory interface so you will have to synthesize one using 8 port pins for a data bus and a couple of more pins for control signals. The ATJ2085 expects to be the bus master and I did not see any pins that would lead me to believe that it will stand for interference from another bus master when it wants to read or write data. That leaves you with the need to construct a robust, simultaneous access, dualport memory. There are not all that many designers on the planet who can pull this off. I hope you are one of them. Of course you could use an actual dualport chip but the size is likely to be way smaller than you might be comfortable with.
I've never seen the subject of dualport memory design discussed in print. We always just wrote the requirements and did the design. Your ATJ2085 expects a memory interface with a parallel design. You provide an address and a read strobe for reading, or an address, data, and a write strobe for writing. This kind of parallel access has nothing to do with any of the serial or nybble wide interfaces used on the SD/MMC cards. Now the PIC with its synthesized memory bus can afford to be held off with ready/busy signal and that is the way I would start the design.
I would set things up in such a way that the actual memory could run 2 memory cycles for every cycle of the fastest master. That way nobody will ever get held off for more than half a cycle even in burst mode with simultaneous requests.
I did not understand all what you recommend me but I'll try to figure out the problem by modifying the low-level code of the Microchip application note ( functions that use SPI) in order to adapt it to the transfer mode of my flash memory (SPI ---> parallell) .
what do you think ?, are there other things to change ?
The obvious thing is how are you going to disconnect the existing processor from the memory?, you can't have two outputs joined together trying to address the same memory.
The obvious thing is how are you going to disconnect the existing processor from the memory?, you can't have two outputs joined together trying to address the same memory.
may be I will face this in simulation, but when reaching this step, how can I simulate the reading/writing in Proteus ISIS since almost all memories that I found in the library are Serial ones ?
may be I will face this in simulation, but when reaching this step, how can I simulate the reading/writing in Proteus ISIS since almost all memories that I found in the library are Serial ones ?
i'd like to know whether there are some specific functions to use in C compilers (CCS, Hi-Tech,...) when writing or reading in or from a flash memory like that one I'm using (parallell, see pins functions above) cause all those I found in CCS C manual are for designd for EEPROM's with I2C protocol
----> (write_configuration_memory (dataptr, count) , write_eeprom (address, value), write_external_memory( address, dataptr, count ), write_program_eeprom (address, data),write_program_memory( address, dataptr, count )).
enclosed: a reading timing from the datashet of my flash memory. ( violet:commands , blue:adress, orange:data)