基于USB2.0总线的高速数据采集系统设计
SYNCDELAY;
FLOWSTBHPERIOD = FlowStates[25]; // 20.83ns half period
SYNCDELAY;
// reset the external FIFO
OEA |= 0x07; // turn on PA0、 PA1、 PA2 as output pin
IOA |= 0x07; // pull PA0、 PA1、 PA2 high initially
IOA &= 0xFB; // bring PA2 low
EZUSB_Delay (1); // keep PA2 low for ~1ms, more than enough time
IOA |= 0x04; // bring PA2 high and exit reset
IOA &= 0xFC; // bring PA0、 PA1 low and enable AD
}
在TD_Poll()中主要完成外部FIFO状态的检测和数据的传输,主要程序部分如下:
void TD_Poll(void)
{
if ( GPIFTRIG & 0x80 ) // if GPIF interface IDLE
FLOWSTBHPERIOD = FlowStates[25]; // 20.83ns half period
SYNCDELAY;
// reset the external FIFO
OEA |= 0x07; // turn on PA0、 PA1、 PA2 as output pin
IOA |= 0x07; // pull PA0、 PA1、 PA2 high initially
IOA &= 0xFB; // bring PA2 low
EZUSB_Delay (1); // keep PA2 low for ~1ms, more than enough time
IOA |= 0x04; // bring PA2 high and exit reset
IOA &= 0xFC; // bring PA0、 PA1 low and enable AD
}
在TD_Poll()中主要完成外部FIFO状态的检测和数据的传输,主要程序部分如下:
void TD_Poll(void)
{
if ( GPIFTRIG & 0x80 ) // if GPIF interface IDLE
- 上一篇论文: 用NCP1200代换脉宽调制控制UC3842的应用电路
- 下一篇论文: 存储器类型综述及DDR接口设计的实现