reading / writing nand flash memory

Discussion in 'Embedded Systems and Microcontrollers' started by tmir, Jul 5, 2012.

  1. tmir

    Thread Starter New Member

    Jul 5, 2012
    1
    0
    hello everybody!

    i am new here, and thats not just in this forum, but also in the world of microcontrollers.
    i have spent some time googling gathering information, but now i got to a point where passive research doesnt get me any further. so its up to you guys, in case anybody is willing to help me getting me from zero to hero ;)

    i want to read and also write on nand flash memory (samsung k9f6408 to be exact) and would like to know what kind of microcontroller is needed for that, down to the software + maybe even code. i found a few lines of code (i think it is written in c - but i havent done any programming apart from the few lines i wrote in school, so i cant really tell):

    Code ( (Unknown Language)):
    1. void FlashRead()    
    2. {
    3. unsigned char d;
    4. Flash_CE=0; file:        
    5. WriteCommand(0x00); file:
    6. WriteAddress(0x00,0); file:
    7. for(d=0;d!=2;d++) file:
    8. {              
    9. uint k=528; file:
    10. while(!Flash_RB)
    11. {                                            
    12. }                                            
    13. while(k) file:
    14. {                                            
    15. Flash_RD=0; file:
    16. #pragma asm file:
    17. NOP                                          
    18. NOP  
    19. #pragma endasm
    20. ACC=P0; file:
    21. #pragma asm
    22. NOP  
    23. NOP
    24. #pragma endasm
    25. Flash_RD=1; file:
    26. SendData(); file:
    27. k--;
    28. }
    29. }
    30. Flash_CE=1; file:
    31. }
    32.  
    does this look correct?
    i also found a few lines for writing and erasing, but i dont want to put too much stuff into my first post, dont want to scare away the few people who kept on reading ;)

    i checked out the datasheet and know the chip's pin configuration - but that is as far as i got. now it has to be hooked up to some kind of microcontroller, the code has to be compiled (in mplab ide?) and flashed on the microcontroller?

    i guess my level of knowledge is obvious, i hope someone can shed some light onto this big mistery for me :)

    thanks in advance!
     
Loading...