Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-10-21
16
Medium Priority
?
225 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
Comment
Question by:nghiaap
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
16 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 12374139
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
ID: 12382379
Flash memory in general, i think
because i know nothing about Flash memory
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 1200 total points
ID: 12382536
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Expert Comment

by:jittul
ID: 12390840
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
ID: 12402510
thanks for all your information
0
 
LVL 16

Expert Comment

by:PaulCaswell
ID: 12419945
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
ID: 12421849
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
ID: 12469875
hey, everybody
do you remember me?
please help me
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 12472179
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
ID: 12489456
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
ID: 12506858
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
ID: 12506881
Sorry, I mean:
 Some OS could not recognize the memory as a common disk
0
 
LVL 1

Author Comment

by:nghiaap
ID: 12520631
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.

596 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