用C ++或C#编程DMA I/O [英] programing DMA I/O in C++ or C#

查看:281
本文介绍了用C ++或C#编程DMA I/O的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我需要一本书,网站或文本,以帮助使用 DMA 在可视或Turbo C ++和C#语言中对端口I/O进行编程.
DMA:数据存储器访问输入/输出

我的电子邮件:[删除电子邮件]

解决方案

您是否尝试过 ^ ]吗?


我使用Google查找源代码没有任何麻烦.

DMA是直接内存访问.

它是一项用于通过内存总线在硬件之间来回传输大容量存储器的技术.它允许在CPU的未使用时钟周期内和/或在无需CPU干预的情况下进行传输的硬件中进行传输.

执行此操作所需的特定端口和内存位置取决于要将数据移入和移出的硬件.您需要连接的硬件的技术数据表,或样本驱动程序的源代码,以确定设置硬件所需进行的调用.您指的是Turbo C ++,所以我认为假设您有兴趣与PC总线连接很安全.为此,您还需要知道是要连接8位卡还是16位卡.

再一次,参考制造商的规格和示例代码是最好的起点.

现在,如果我误解了您的要求,而您只想读取和写入端口...,请使用功能inportb()和outportb().

我认为您无法使用C#做到这一点.这种级别的编码通常在汇编或C/C ++中完成.


hi I Need a Book or Sites or Texts for help programing ports i/o with DMA in visual or turbo C++ and C# languages

DMA: data memory access input/output

my email: [EMAIL REMOVED]

解决方案

Did you try googling[^] it?


I didn''t have any trouble finding source code using google.

DMA is Direct Memory Access.

It''s a technology for doing bulk memory transfers to and from hardware, across a memory bus. It allows the transfer to happen during the unused clock cycles of a CPU and/or in hardware designed to do the transfer without CPU interaction.

The specific ports and memory locations needed to perform this action is dependant on the hardware that you are moving the data to and from. You''ll need tech data sheets for the hardware you''re interfacing, or source code for a sample driver to determine what calls you need to make to set up the hardware. you''re referring to Turbo C++, so I think it''s safe to assume your interested in interfacing in a PC bus. For that you''ll also need to know if you''re interfacing to an 8 bit card or a 16 bit card.

Once again, referring to the manufacturer''s specifications and sample code is the best place to start.

Now If I misunderstand what you''re asking, and you just want to read and write to ports... then use the functions inportb() and outportb().

I don''t think you can do this with C#. This level of coding is usually done in assembly or C/C++.


这篇关于用C ++或C#编程DMA I/O的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆