- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
I trying to slave fifo in fx2lp 56pin.
And i now see the following example about slave fifo.
But i don't know what whether IOC used to output or input.
Could you please let me now about the direction of "IOC" ?
Also, what is different between "IOC & 0x02" and "IOC|=0x01"? i don't know what they have meaning.
Thanks.
void TD_Poll( void )
{
if(!(IOC & 0x02))
{
done_frm_fpga = 1;
}
if ((done_frm_fpga) && (IOC & 0x02))
{
IFCONFIG = 0x03;
SYNCDELAY;
IOC|=0x01; //output 1 on PC.0...SYNC signal is HIGH
SYNCDELAY;
done_frm_fpga = 0;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
In fw.c you can see that PC.0 is configured as an Output pin and PC.1 as input as below:
OEC|=0x01; //PC.0 as output (SYNC signal)
SYNCDELAY;
OEC&=0xFD; //PC.1 as input (Clock changing signal)
SYNCDELAY;
It is the OEC register that determines which pin of port C acts as input, and which as output.
Regards,
Gayathri