At 2004-07-14 19:33, ali marjovi wrote: >I'm building a data aquisition system with one 8 bit >input sampled at 400khz and need to save stream of >about 1 minute duration in PC RAM. >I'm using ADC0820 as A2D and also data transfer >through ISA bus . >My question is about PC part.Is it nessecary to use >DMA transfer?
It depends on if you want to do anything else during the transport. The strange thing with a PC is that the CPU is about as fast as DMA when you use string instructions. I'm now talking about early PC's, so upto the 286. With modern CPU's it might even be possible to do it with the CPU using interrupts. If you have a 1 Ghz CPU (like I have) you can execute about 2 G instructions per second so you can execute 2000000/400=5000 instructions between two samples, which should be enough even when the cache isn't cooperating optimally. >Do you know a C library which ease the DMA programming? Don't know, but it's probably standard in any PC IDE. Doing it yourself isn't that hard either: - set up the DMA-controller for the transport - set up an interrupt at the end of the transport (either from the DMA-controller or the I/O-device or both) - instruct the I/O advice to start the transport And just to make it really secure also set up a timer interrupt after a while to provide a time-out when something goes wrong. >Can a nonreal time OS like windows do the job? Probably not when using the CPU and interrupts but with DMA it should be possible. >What about the DOS? In DOS everything is possible, because you can take over the complete machine and disable all other interrupts etc. DOS is a great way to start up your own OS... BTW. You can also start your application from the boot sector of a floppy, but then you will have to read your application into memory from the floppy yourself. It's usually easier to let DOS do this and then disable it. Greetings, Jaap -- Chip Directory -- http://www.chipdir.biz/ -- http://www.chipdir.info/ -- http://www.chipdir.net/ -- http://www.chipdir.nl/ -- http://www.chipdir.org/ -- And about 30 other mirror sites world-wide. -- -- To subscribe to a free 'chip issues, questions and answers' -- mailing list, send a message to [EMAIL PROTECTED] with -- in the body 'subscribe chipdir-L'. About 500 experts are -- willing to think with you about electronics problems etc. -- Author: Jaap van Ganswijk INET: [EMAIL PROTECTED] Fat City Hosting, San Diego, California -- http://www.fatcity.com --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB CHIPDIR-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
