Solved

What is Flash Memory, How to access it ...

Posted on 2004-10-21
221 Views
Last Modified: 2010-04-15
Hi all,
I have a question for u
I don't know What is inside a Flash memory, the way it work
And how to directly read data from Flash memory by C, ASM, or Interupt ... both in Windows and Linux
i think Some example code will make your explain clearer
thanks
0
Question by:nghiaap
    13 Comments
     
    LVL 55

    Expert Comment

    by:Jaime Olivares
    What kind of flash memory?
    Compact Flash and PCMCIA flash memories act exactly as a harddisk. Normally are FAT formatted.
    0
     
    LVL 1

    Author Comment

    by:nghiaap
    Flash memory in general, i think
    because i know nothing about Flash memory
    0
     
    LVL 55

    Accepted Solution

    by:
    It is an ambiguous question. There are many flash memory "packages", there is not a unique answer to make programs that access flash memories, that will depend on memory type.
    If you want to learn more about flash memories in general, have a look at:
    http://computer.howstuffworks.com/flash-memory.htm
    0
     

    Expert Comment

    by:jittul
    Hi,
    To know the internals  of a Flash memory, id suggest you to use the link suggested by jaime_olivares,
    To read or write data to flash memory:
    A flash memory is usually connected to the processor or controller via the bus,
    bus contains three components - address, data and control,
    the address and data bus are directly connected to the MPU or MCU where as the control bus is used to
    differentiate the operations performed on the device namely read, write, enable, disable, etc.
    If you are to read and write to flash memory, it has to be connected to your motherboard in some way
    (USB, PCI, ISA, etc).
    The operating system you use has some pre defined API on how to access each specific interface (USB, PCI, ISA, etc) which is called as the Device Driver.
    So in the first step, you need to know on how to write that (which is again OS specific).
    After you know that, you need to get the Document provided by the Manufacturer for the Flash memory
    you are using (which is called as the Data sheet) to write the Control Routines for Reading and Writing
    data from the chip.
    After you finished this step, you need to integrate your control routines with the device driver.

    sorry for making it look scary ;-)
    Hope this  throws some light on what you are looking for.

    Regards
    Jittu
    0
     
    LVL 1

    Author Comment

    by:nghiaap
    thanks for all your information
    0
     
    LVL 16

    Expert Comment

    by:PaulCaswell
    There is also what is called 'Flash' memory in modems and T/As for storing settings. 'Flash' is also sometimes used as a name for CMOS memory. In these cases it is accessed in similar way to conventional memory except that it is in a fixed location in memory.

    E.G.

    int * FlashMemory = (int *)0xC80000;

    Paul
    0
     
    LVL 1

    Author Comment

    by:nghiaap
    how can i get data from Flash disk
    is there any function like _biosdisk, BIOS interrupt, DOS interrupt to get data from HD and  FD, or i can use these function too
    0
     
    LVL 1

    Author Comment

    by:nghiaap
    hey, everybody
    do you remember me?
    please help me
    0
     
    LVL 55

    Expert Comment

    by:Jaime Olivares
    To get data from flash disk, just use standard harddisk functions, assumming it has FAT format.
    Have a look to this previous question about reading disk sectors directly:
    http://www.experts-exchange.com/Programming/Programming_Languages/C/Q_21011576.html
    0
     
    LVL 1

    Author Comment

    by:nghiaap
    thanks jaime olivares
    i'll give it a try


    another thing.
    can it use for difference OSs for example MS OSs and Linux or something else
    0
     
    LVL 55

    Expert Comment

    by:Jaime Olivares
    It will depend on how other OSs handles the memory. Some OS could not recognize the memory as a file, but surely Windows do it.
    0
     
    LVL 55

    Expert Comment

    by:Jaime Olivares
    Sorry, I mean:
     Some OS could not recognize the memory as a common disk
    0
     
    LVL 1

    Author Comment

    by:nghiaap
    hi jaime olivares
    there are 2 problems
    1. the code in your link :http://www.experts-exchange.com/Programming/Programming_Languages/C/Q_21011576.html
    doesn't work,the error code is 1
    2. which number is associated with flash disk (the number assigned to iregs.h.dl)
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
    Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
    The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
    The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

    933 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now