• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 241
  • Last Modified:

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

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
nghiaap
Asked:
nghiaap
1 Solution
 
Jaime OlivaresSoftware ArchitectCommented:
What kind of flash memory?
Compact Flash and PCMCIA flash memories act exactly as a harddisk. Normally are FAT formatted.
0
 
nghiaapAuthor Commented:
Flash memory in general, i think
because i know nothing about Flash memory
0
 
Jaime OlivaresSoftware ArchitectCommented:
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
Increase Security & Decrease Risk with NSPM Tools

Analyst firm, Enterprise Management Associates (EMA) reveals significant benefits to enterprises when using Network Security Policy Management (NSPM) solutions, while organizations without, experienced issues including non standard security policies and failed cloud migrations

 
jittulCommented:
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
 
nghiaapAuthor Commented:
thanks for all your information
0
 
PaulCaswellCommented:
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
 
nghiaapAuthor Commented:
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
 
nghiaapAuthor Commented:
hey, everybody
do you remember me?
please help me
0
 
Jaime OlivaresSoftware ArchitectCommented:
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
 
nghiaapAuthor Commented:
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
 
Jaime OlivaresSoftware ArchitectCommented:
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
 
Jaime OlivaresSoftware ArchitectCommented:
Sorry, I mean:
 Some OS could not recognize the memory as a common disk
0
 
nghiaapAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now