arthurtu
驱动巨牛
驱动巨牛
  • 注册日期2001-11-08
  • 最后登录2020-12-19
  • 粉丝0
  • 关注0
  • 积分26分
  • 威望161点
  • 贡献值0点
  • 好评度35点
  • 原创分0分
  • 专家分0分
  • 社区居民
阅读:1197回复:0

请教PLX-9054的问题

楼主#
更多 发布于:2001-12-03 16:10
我在Dos下写DMA的程序时遇到的问题,向大虾们请教:
PLX-9065,BC++

用Scatter/Gather mode

unsigned long DMADATA[4096];
unsigned long Descriptor[20];
//赋值给数组DMADATA[4096],省略
//设置9054,省略
// now set memory descriptor
outport (dw9054Addr+0x90, (DPTR&0x0ffff) | 0x01);    //DPTR is the memory address of Descriptor

outport (dw9054Addr+0x92, (DPTR>>16) & 0xffff);

// Set Memory Descriptor Blocks

Descriptor [0] =Tri_Add;     //Tri_Add is address of MADATA [4096],物理地址

Descriptor [1] =0x0040;      // 0x0040 is address of my on board FIFO

Descriptor [2] =0x2000;      //4096*2

Descriptor [3] = (DPTR+sizeof (unsigned long)*4) | 0x01;

Descriptor [4] = Sin_Add;   // another array address,正弦波,物理地址

Descriptor [5] = 0x0040;

Descriptor [6] = 0x2000;

Descriptor [7] = DPTR | 0x03;     // end chain

// then start DMA

outport(dw9054Addr+0xA8,0x0009);   //Enable DMA CH0

outport(dw9054Addr+0xA8,0x000b);  //Start DMA CH0

这样可以吗?我在示波器上看不见输出波型呀。就算我用循环也看不见,连个干扰都没
有:(

while(!kbhit())

{

outport(dw9054Addr+0xA8,0x0009);   //Enable DMA CH0

outport(dw9054Addr+0xA8,0x000b);  //Start DMA CH0

}
游客

返回顶部